首页 > 移动平台 > 详细

iOS - 点击UIButton不变灰,button的image不变灰

时间:2019-05-08 10:08:14      阅读:247      评论:0      收藏:0      [点我收藏+]

 

要想让uibutton点击不变灰
初始化的时候就不能
        UIButton *button = [[UIButton alloc]init];

初始化的时候酱紫,可以保证button点击时不变灰
        UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];

如果只做了上面的button不会变灰,但是图片还会变灰,下面的可以保证图片不变灰
        buttomButton.adjustsImageWhenHighlighted = NO;

 

iOS - 点击UIButton不变灰,button的image不变灰

原文:https://www.cnblogs.com/gongyuhonglou/p/10830075.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!