调整UIButton的图片和文字位置

[button setImageEdgeInsets:UIEdgeInsetsMake(0, 0, 0, -button.titleLabel.intrinsicContentSize.width)];
[button setTitleEdgeInsets:UIEdgeInsetsMake(0, -button.currentImage.size.width, 0, 0)];

https://juejin.im/post/5a51cdf9518825733365deba

你可能感兴趣的:(调整UIButton的图片和文字位置)