类方法创建UIButton的类型
2016-06-13 00:00
302 查看
摘要: 你是否为创建一个圆角、+、!button而犯愁,其实你只是不知道UIButton的常见创建类型
UIButton *button=[[UIButton buttonWithType:(UIButtonType);
能够定义的button类型有以下6种,
UIButtonTypeCustom = 0, 自定义风格
UIButtonTypeRoundedRect, 圆角矩形
UIButtonTypeDetailDisclosure, 蓝色小箭头按钮,主要做详细说明用
UIButtonTypeInfoLight, 亮色感叹号
UIButtonTypeInfoDark, 暗色感叹号
UIButtonTypeContactAdd, 十字加号按钮
看到这些,你一定会想以前用
btn.layer.cornerRadius = 5f;
btn.layer.masksToBounds = YES;
是多么费时不讨好了吧
UIButton *button=[[UIButton buttonWithType:(UIButtonType);
能够定义的button类型有以下6种,
UIButtonTypeCustom = 0, 自定义风格
UIButtonTypeRoundedRect, 圆角矩形
UIButtonTypeDetailDisclosure, 蓝色小箭头按钮,主要做详细说明用
UIButtonTypeInfoLight, 亮色感叹号
UIButtonTypeInfoDark, 暗色感叹号
UIButtonTypeContactAdd, 十字加号按钮
看到这些,你一定会想以前用
btn.layer.cornerRadius = 5f;
btn.layer.masksToBounds = YES;
是多么费时不讨好了吧
相关文章推荐
- CSS3圆角button
- 使用shape实现圆角button
- button及其他容器圆角简单实现
- imageView的contentMode属性
- SUI Mobile的简单引入
- SUI Mobile:侧栏组件的使用
- build your own lisp ch5
- iptables中DNAT、SNAT和MASQUERADE的作用
- <LeetCode OJ> 60. Permutation Sequence
- 双端队列(Double-ended Queue)
- 代码手写UI,xib和StoryBoard间的博弈,以及Interface Builder的一些小技巧
- VUEJS 实战教程第三章,利用laypage插件实现分页
- UIDocumentInteractionController 预览和打开文档
- request获取各种路径总结
- [LeetCode]problem 60. Permutation Sequence
- VUEJS实战教程第一章,构建基础并渲染出列表
- gem5——building up-to-date kernels for gem5 running on ARM
- 2016 UESTC Training for Graph Theory
- UEditor之图片上传如何和真实项目结合
- UVA1252 Twenty Questions