标签:color os io ar for cti 代码 sp on
@implementation ViewController
- (void)viewDidLoad
{
[super viewDidLoad];
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
btn.frame = CGRectMake(100, 200, 100, 50);
btn.backgroundColor = [UIColor redColor];
[btn addTarget:self action:@selector(onBtnClick:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:btn];
}
- (void)onBtnClick:(id)sender{
//你的功能代码
}
标签:color os io ar for cti 代码 sp on
原文地址:http://www.cnblogs.com/i0ject/p/3955320.html