Jea*_*ott 0 iphone uibutton ios
我已经看到了两种创建按钮的方法.
UIButton *button = [[UIButton alloc]initWithFrame:CGRectMake(10, 220, 150, 30)];
Run Code Online (Sandbox Code Playgroud)
和
UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
Run Code Online (Sandbox Code Playgroud)
第一种情况是创建按钮对象的常规方法.我已经分配并初始化了一个按钮实例,我必须释放它.我真的很困惑第二种方式.我对此有一些疑问.
| 归档时间: |
|
| 查看次数: |
447 次 |
| 最近记录: |