I created a custom UIButton (subclass of UIButton) for my application. Under this button, how would I change the background color when clicked? (It should return to its normal background when depressed. I am currently using Core Graphics to paint a gradient background.)
I tried forking in drawRect: (checking for self.selected and self.highlighted , but no changes happen because drawRect not called in the touch event.
Any suggestions or code examples are welcome.
ios iphone cocoa-touch uibutton subclass
Evan mulawski
source share