1.设置UIButton的文字居右显示 [button setContentHorizontalAlignment:UIControlContentHorizontalAlignmentRight]; 2.去掉点击默认置灰效果 [button setAdjustsImageWhenHighlighted:NO]; // default is YES. if YES, image is drawn darker when highlighted(pressed)
一. Imageview的点击效果——图片稍微变暗突出点击效果 public class ClickImageView extends AppCompatImageView { public ClickImageView(Context context) { super(context); } public ClickImageView(Context context, AttributeSet attrs) { super(context, attrs); } public ClickImag