How to disable button highlight effect on click? Have custom button with white bg color and DarkGray text color. The problem is the text becomes white on button click. Already tried but none of them worked:
a. Did uncheck "Highlighted Ajusts Image" in interface builder.
b. Tried setting highlighted = NO in button pressed method:
((UIButton *)sender).highlighted = NO
c. Tried setting the same title for highlihted state:
[button setTitle:[button titleForState:UIControlStateNormal] forState:UIControlStateHighlighted];
Any suggestions?
You could also make the UIButton type : custom from StoryBoard
This should strip down any system behavior for you. (I think)
This is a solution for buttons that have images. In the storyboard, there is a property called HighlightedAdjustsImage
which is On by default. Disable that and your button image will not show any highlighted properties.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With