UIButton 选中状态下 高亮显示

2016-11-16  本文已影响0人  moodi

Normal 状态下高亮UIControlStateHighlighted

Selected 状态下高亮 UIControlStateSelected | UIControlStateHighlighted

+(void)setToggleBtn:(UIButton *)Btn

{

[Btn setImage:[UIImage imageNamed:@"power_off"] forState:UIControlStateNormal];

[Btn setImage:[UIImage imageNamed:@"power_on"] forState:UIControlStateSelected];

[Btn setImage:[UIImage imageNamed:@"power_press"] forState:UIControlStateHighlighted];

[Btn setImage:[UIImage imageNamed:@"power_press"] forState:UIControlStateSelected | UIControlStateHighlighted];

}

####推荐一个linux命令行网站:https://rootopen.com

上一篇 下一篇

猜你喜欢

热点阅读