button.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
button.titleEdgeInsets = UIEdgeInsetsMake(button.imageView.frame.size.height, -button.imageView.frame.size.width, 0, 0);
button.imageEdgeInsets = UIEdgeInsetsMake(-button.imageView.frame.size.height, 0, 0, - button.titleLabel.bounds.size.width);
上面两button
Simulator Screen Shot - iPhone X - 2018-08-22 at 13.59.24.png
网友评论