button图片与文字位置

图片在上,文字在下

button.titleEdgeInsets = UIEdgeInsetsMake(0, -button.imageView.frame.size.width, -button.imageView.frame.size.height - 5, 0);
button.imageEdgeInsets = UIEdgeInsetsMake(-button.titleLabel.intrinsicContentSize.height - 5, 0, 0, -button.titleLabel.intrinsicContentSize.width);

你可能感兴趣的:(button图片与文字位置)