I have a UIButton in one of my ViewControllers with three different state images (normal, highlighted and selected). When I press this button, it becomes highlighted and when I release it, selected. I want to make an animation that changes the highlighted image of the button to the selected one in 4 seconds with a fadeIn or so.
Any suggestion?
You have to enroll your own
UIButton
subclass and you'll probably have to overwritesetSelected
andsetHighlighted
with your custom animation code. The safer bet would be to subclassUIControl
directly and reimplement those selectors so that you don't have anyUIButton
specific legacy.