button的两种初始化

button的初始化有两种
一种是动态创建 
UIButton *button1 = [UIButton alloc]initWithFrame:CGRectMake(0, 0, 80, 50)]; 
接下来设置button属性
另一种是静态创建
UIButton *button2 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
设置button2的frame

posted @ 2012-08-21 16:51  zander  阅读(2159)  评论(0)    收藏  举报