【发布时间】:2011-06-05 21:08:53
【问题描述】:
给定(任意):
CGRect frame = CGRectMake(0.0f, 0.0f, 100.0f, 30.0f);
下面两个代码sn-ps有什么区别?
1.
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
button.frame = frame;
2.
UIButton *button = [[[UIButton alloc] initWithFrame:frame] autorelease];
【问题讨论】:
标签: ios objective-c uibutton