美文网首页
UIButton 选中状态下 高亮显示

UIButton 选中状态下 高亮显示

作者: moodi | 来源:发表于2016-11-16 14:37 被阅读0次

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

相关文章

网友评论

      本文标题:UIButton 选中状态下 高亮显示

      本文链接:https://www.haomeiwen.com/subject/ohtzsttx.html