IPhone: UIButton does not use default highlighting

Currently, when you use UIButton and click on it, it gives the button a dark overlay as a button click indicator. I do not want this, because I am implementing my own pressed state.

How to remove this default value?

+6
iphone uibutton
source share
2 answers

You can set it by setting the image for the control state. Think about him

[button setBackgroundImage:[UIImage imageNamed:@"Selected_day.png"] forState:UIControlStateHighlighted]; 
+3
source share

You can also set the corresponding property:

 button.adjustsImageWhenHighlighted = NO; 
+22
source share

All Articles