开发者

iPhone: UIButton don't use default pressed highlight

开发者 https://www.devze.com 2023-01-15 23:08 出处:网络
Currently when you use a UIButton and press down on it, it gives the button a dark overlay as an indicator that the button was pressed.I don\'t want this as I am implementing my own pressed state.开发

Currently when you use a UIButton and press down on it, it gives the button a dark overlay as an indicator that the button was pressed. I don't want this as I am implementing my own pressed state.

开发者_C百科

How can I remove this default?


You could also set the appropriate property:

button.adjustsImageWhenHighlighted = NO;


You should be able to set it by setting the image for the control state. Think its

[button setBackgroundImage:[UIImage imageNamed:@"Selected_day.png"] forState:UIControlStateHighlighted];
0

精彩评论

暂无评论...
验证码 换一张
取 消