1.设置UIButton的文字居右显示
[button setContentHorizontalAlignment:UIControlContentHorizontalAlignmentRight];
2.去掉点击默认置灰效果
[button setAdjustsImageWhenHighlighted:NO]; // default is YES. if YES, image is drawn darker when highlighted(pressed)
1.设置UIButton的文字居右显示
[button setContentHorizontalAlignment:UIControlContentHorizontalAlignmentRight];
2.去掉点击默认置灰效果
[button setAdjustsImageWhenHighlighted:NO]; // default is YES. if YES, image is drawn darker when highlighted(pressed)
转载于:https://www.cnblogs.com/china-fanny/p/6038044.html