UIButton
2016-04-08 11:54
211 查看
UIButton*button=[UIButton
buttonWithType:(UIButtonTypeRoundedRect)];
button.frame=CGRectMake(150, 450, 100, 50);
button.backgroundColor=[UIColor
redColor];
[button setTitle:@"Click"
forState:UIControlStateNormal];
//button交互事件-点击button改变label的文字
[button addTarget:self
action:@selector(gaibian)
forControlEvents:UIControlEventTouchUpInside];
[self.view
addSubview:button];
buttonWithType:(UIButtonTypeRoundedRect)];
button.frame=CGRectMake(150, 450, 100, 50);
button.backgroundColor=[UIColor
redColor];
[button setTitle:@"Click"
forState:UIControlStateNormal];
//button交互事件-点击button改变label的文字
[button addTarget:self
action:@selector(gaibian)
forControlEvents:UIControlEventTouchUpInside];
[self.view
addSubview:button];
相关文章推荐
- 【LeetCode】62. Unique Paths解法及注释
- java.lang.IllegalArgumentException: Page directive: invalid value for import
- iOS-NSLineBreakMode-lineBreakMode属性详解(UILabel省略号位置)
- requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine("''",))
- 解读UIL图片缓存以及自己构建内存缓存
- 【LA3263】That Nice Euler Circuit——欧拉定理的应用
- android UI 的一些技巧
- 轻量级计算点击UILabel中的文字位置
- query操作的加锁过程和时间统计
- mui禁止横屏显示,仅支持竖屏显示
- 使用webpack,vue文件导入样式文件报错
- UILabel
- UITableView简单介绍
- iOS设置UILabel的行间距
- LeetCode(36)- Implement Stack using Queues
- LeetCode(36)- Implement Stack using Queues
- LeetCode(36)- Implement Stack using Queues
- xcodebuild error: unable to rename temporary
- java之Continue解析
- dequeueReusableCellWithIdentifier和dequeueReusableCellWithIdentifier:forIndexPath的区别