// 给自定义的button添加这个属性
self.myButton.semanticContentAttribute = UISemanticContentAttributeForceRightToLeft
// 设置文字和图片的间距
CGFloat margin = 5;
self.myButton.imageEdgeInsets = UIEdgeInsetsMake(0, margin, 0, -margin);
// 给自定义的button添加这个属性
self.myButton.semanticContentAttribute = UISemanticContentAttributeForceRightToLeft
// 设置文字和图片的间距
CGFloat margin = 5;
self.myButton.imageEdgeInsets = UIEdgeInsetsMake(0, margin, 0, -margin);
本文标题:iOS UIButton文字左图片右
本文链接:https://www.haomeiwen.com/subject/tuawictx.html
网友评论