Take the 2-minute tour ×

I am trying to change a UIButton's state programmatically, so that when i tap it, the background stays blue. I can change the enabled property and that works, but changing selected or highlighted doesnt affect the state.

Is this possible?


share|improve this question

1 Answer 1

up vote 1 down vote accepted

You could always keep track of your own state independently of the button with an ivar and then change the background of the button to suit the state.

share|improve this answer
So the selected and highlighted properties are useless? –  Frederic Yesid Peña Sánchez Oct 3 '13 at 17:41

Your Answer


