UIButton
2015-08-27 09:36
507 查看
UIButton相关代码如下:
UIButton *fistBt = [[UIButton alloc] initWithFrame:CGRectMake(10, 130, SCREEN_WIDTH/2 - 25, 40)]; [fistBt.layer setCornerRadius:5]; [fistBt setTitle:@"取消" forState:0]; [fistBt setTintColor:RGB(255, 106, 34)]; [fistBt setBackgroundColor:[UIColor lightGrayColor]]; [fistBt addTarget:self action:@selector(fistClick) forControlEvents:UIControlEventTouchUpInside];给button添加图片
//设置button填充图片,不会拉伸控件 [button1 setImage:[UIImage imageNamed:@"btng.png"] forState:UIControlStateNormal];
相关文章推荐
- POJ 2328 Guessing Game(水~)
- [Bluetooth Core V4.2 ] VOL2, PartB, 2 PHYSICAL CHANNELS
- POJ 2299 Ultra-QuickSort(归并排序)
- UIlabel
- POJ 2264 Advanced Fruits--最长公共子序列
- easyui 时间控件包含时分
- Android UI设计:shape
- Android UI设计——GridView控件
- error MSB8031: Building an MFC project for a non-Unicode character set is deprecated
- 黑马程序员-----Java基础-----GUI
- IOS开发笔记-UIResponder
- Access restriction: The type BASE64Encoder is not accessible due to restrict on required library
- iOS UI21_多线程
- UI:数据持久化
- iOS开发学习之UITableView
- UIGraphicsBeginImageContext
- SPOJ 题目913QTREE2 - Query on a tree II(Link Cut Tree 查询路径第k个点)
- iOS部分-UI基础控件 - 01天 入门 第10课 frame&bounds¢er属性
- iOS部分-UI基础控件 - 01天 入门 第08课 创建应用程序中的一些细节
- iOS部分-UI基础控件 - 01天 入门 第07课 私有扩展&IBAction