let button = UIButton(frame:btnframe)
button.semanticContentAttribute = .forceRightToLeft
//semanticContentAttribute : UISemanticContentAttribute
设置一个属性就可以做到,如果需要文字和图标之间有间距就直接在文字后边添加空格即可
let button = UIButton(frame:btnframe)
button.semanticContentAttribute = .forceRightToLeft
//semanticContentAttribute : UISemanticContentAttribute
设置一个属性就可以做到,如果需要文字和图标之间有间距就直接在文字后边添加空格即可
本文标题:ios Btn 文字在左图片在右 一键设置
本文链接:https://www.haomeiwen.com/subject/okflvqtx.html
网友评论