UIButton的属性设置
1.背景颜色 btn.backgroundColor = [UIColor redColor];
2.给按钮添加文字并添加显示状态 [btn setTitle@"播放" forState:UIControlStateNormal];
3.设置文字的颜色并添加显示状态 [btn setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
4.给按钮一个frame btn.frame = CGRectMake(100, 100, 270, 80);
5.给按钮添加点击事件 [btn addTarget:self action:@seletor(handleButton:) forContorlEvent:UIControlEventTouchUpInside];
6.给按钮添加图片[btn setImage:[UIImage imageNamed@"1.jpg"] forState:UIControlEventTouchUpInside];
7.按钮被选中的状态 button.selected = YES;