UIButton在正常(UIControlStateNormal)和选中状态(UIControlStateSelected)下的高亮状态(UIControlStateHighlighted)

UIButton在不同状态下的设置:

UIControlStateNormal 正常状态

UIControlStateHighlighted 高亮状态,按钮按下时状态,在正常状态时按下

UIControlStateSelected 选中状态

UIControlStateSelected|UIControlStateHighlighted 高亮状态,按钮按下时状态,在选中状态时按下

例如:

[btn setImage:  forState:UIControlStateNormal];

[btn setImage:  forState:UIControlStateHighlighted];

[btn setImage:  forState:UIControlStateSelected];

[btn setImage:  forState:UIControlStateSelected|UIControlStateHighlighted];

你可能感兴趣的:(UIButton在正常(UIControlStateNormal)和选中状态(UIControlStateSelected)下的高亮状态(UIControlStateHighlighted))