//文字在靠在最左边 (右边为Right)
button.contentHorizontalAlignment =UIControlContentHorizontalAlignmentLeft;
//文字靠在最顶部 (底部为bottom)
button.contentVerticalAlignment = UIControlContentVerticalAlignmentTop;
//文字在靠在最左边 (右边为Right)
button.contentHorizontalAlignment =UIControlContentHorizontalAlignmentLeft;
//文字靠在最顶部 (底部为bottom)
button.contentVerticalAlignment = UIControlContentVerticalAlignmentTop;
本文标题:IOS UIButton设置 textAlignment 属性
本文链接:https://www.haomeiwen.com/subject/rmadiktx.html
网友评论