首页 > 其他 > 详细

UIButton文字左对齐以及增加边框

时间:2014-10-30 13:14:43      阅读:298      评论:0      收藏:0      [点我收藏+]

UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect];

[button setFrame:CGRectMake(btnX, btnY, btnWidth, btnHeight)];

button.layer.borderWidth = 1;     // 边框宽度设置为1

[button setContentHorizontalAlignment:UIControlContentHorizontalAlignmentLeft];  // 左对齐

UIButton文字左对齐以及增加边框

原文:http://www.cnblogs.com/ftrako/p/4062163.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!