I only want to replace the image for the normal state but not other states, and that’s what I did. But then when press the button, I am getting a darkgray background color, instead of the expected official blue color, do I really have to set image for UIControlStateSelected and UIControlStateHighlighted as well?
Share
Yes.
As if you use an image that does not look like the default UIButton, the dark gray tint of the button would make sense, falling back to the default blue button is awkward.
If you really like the default blue selected button, you may draw it yourself or use an image like this: