iOS: How to disable Fading in and out effect of UIButton

Viewed 9898

First of all, sorry for the title and asking this incredibly question but I simply couldn't figure it out. Also, since it is not related to code, I don't have code to show

I am working on an app and using iOS7 and I created a button from IB, set its background image to an image I designed. Connected it with header and set its touch up inside action as an IBAction

Yet, here is my problem. Whenever I click on the button, as an effect the image fades half transparent. I do not want this default attribute. I checked all the states on IB (highlighted, disabled, selected) and couldn't figure it out.

If I create the same button programmatically, only the text color changes, however when I set the background image, image fades (perhaps to indicate the button being pressed). How can I remove this effect?

5 Answers

Storyboard Solution

1:set button type to custom
2:uncheck "Highlighted adjusts Image" enter image description here

If you want fading in & out effect your UIButton Type Should be a system, not custom.

Related