I've got a UIButton that, when selected, shouldn't change state when being touched.
The default behaviour is for it to be in UIControlStateHighlighted while being touched, and this is making me angry.
Suggestions?
cocoa-touchiosuibuttonuicontroluikit
I've got a UIButton that, when selected, shouldn't change state when being touched.
The default behaviour is for it to be in UIControlStateHighlighted while being touched, and this is making me angry.
Suggestions?
Best Answer
Your button must have its
buttonType
set to Custom.In IB you can uncheck "Highlight adjusts image".
Programmatically you can use
theButton.adjustsImageWhenHighlighted = NO;
Similar options are available for the "disabled" state as well.