iOS UIButton详细介绍
来源:未知 责任编辑:责任编辑 发表时间:2015-09-16 20:03 点击:次
	   
	
	  
	  
	  昨天,做了项目中的一点,觉得细节还是很重要的。像一个普通的UIButton,给它调试字体格式,大小什么的,确实是蛮耗时间的。
p> 
p>  今天打算详细的归纳归纳。。
p>
	
	
 
 
typedef NS_ENUM(NSInteger, UIButtonType) {  
    UIButtonTypeCustom = 0,    //可以自适应的类型,一般给它添加图片,跟据背景图片的大小来调节本身的大小,如果不设置frame的话,将不会显示       // no button type  
    UIButtonTypeRoundedRect,          // rounded rect, flat white button, like in address card <span style="color: rgb(0, 130, 0); font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 13px; line-height: 14px; text-align: left; ">圆角矩形</span>  
  
    UIButtonTypeDetailDisclosure,//显示细节》<span style="color: rgb(0, 130, 0); font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 13px; line-height: 14px; text-align: left; background-color: rgb(248, 248, 248); ">蓝色小箭头按钮,主要做详细说明用</span>  
    UIButtonTypeInfoLight,//<span style="color: rgb(0, 130, 0); font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 13px; line-height: 14px; text-align: left; ">亮色感叹号</span>  
    UIButtonTypeInfoDark,//<span style="color: rgb(0, 130, 0); font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 13px; line-height: 14px; text-align: left; background-color: rgb(248, 248, 248); ">暗色感叹号</span>  
    UIButtonTypeContactAdd,//<span style="color: rgb(0, 130, 0); font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 13px; line-height: 14px; text-align: left; "> 十字加号按钮,貌似用这个模式,不能给按钮添加title</span>  
};  
 
相关新闻>>
- 发表评论
- 
				
- 最新评论 进入详细评论页>>









![[iPhone中级]iPhone团购信息客户端的开发 (二)](/uploads/allimg/131022/200H11235-0-lp.png)
