A UIButton with a custom background image for normal and highlighted states, suddenly became dark when highlighted, after migrating to iOS 7 SDK.
adjustsImageWhenHighlighted
was set to NO and it was working fine up until the new SDK.
Button is defined in a XIB and being assigned with text later in code.
What was changed?
It turns out that during the migration, the interface builder changed the button type from Custom into System.
System buttons do this behaviour, even when adjustsImageWhenHighlighted
is turned off.
After changing button type back to Custom
, issue was fixed.
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