iOS Override Highlighted for UIButton?

ArtOfWarfare

macrumors G3
Original poster
Nov 26, 2007
8,614
4,085
I would like to make it so that a button highlights when it's selected, and remains highlighted until another is selected.

Any suggestions?

I have tried simply adding to the method that the button invokes to have it remain highlighted, but that doesn't work because UIButton automatically unhighlights itself on touch up after the method it invokes is called.
 

ArtOfWarfare

macrumors G3
Original poster
Nov 26, 2007
8,614
4,085
I found a way to make it work.

The method that the button invokes involves creating a UIPicker. While the picker is finding the titles, it disables and highlights the button. (It disables the button so that touching it won't cause touchup to fire again, thus automatically ending the highlight.)
 
Comment
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.