IOS UIButton设置 textAlignment 属性
2020-11-23 本文已影响0人
夜涂黑
//文字在靠在最左边 (右边为Right)
button.contentHorizontalAlignment =UIControlContentHorizontalAlignmentLeft;
//文字靠在最顶部 (底部为bottom)
button.contentVerticalAlignment = UIControlContentVerticalAlignmentTop;