UIButton - alloc initWithFrame: vs. buttonWithType:

前端 未结 6 1104
滥情空心
滥情空心 2020-12-06 17:13

Given (arbitrarily):

CGRect frame = CGRectMake(0.0f, 0.0f, 100.0f, 30.0f);

What\'s the difference between the following two code snippets?<

6条回答
  •  既然无缘
    2020-12-06 17:19

    You can use the first and do "[button retain];", so you will never lose the pointer.

提交回复
热议问题