ios Btn 文字在左图片在右 一键设置

2019-03-22  本文已影响0人  super大太阳

let button = UIButton(frame:btnframe)
button.semanticContentAttribute = .forceRightToLeft
//semanticContentAttribute : UISemanticContentAttribute
设置一个属性就可以做到,如果需要文字和图标之间有间距就直接在文字后边添加空格即可

上一篇 下一篇

猜你喜欢

热点阅读