I need a button that changes state in an animated way when the user touches it.
I have spent quite a bit of time going down the "make a UIImageView-derived control respond to touches" road with no success. I can get it to display correctly and to animate correctly, but not to respond to touches.
So I changed approaches. I am now using a UIButton-derived control. UIButton inherits UIControl, which UIImageView is not. So UIButton has an addTarget: action:... method. I figured I could use this method to capture the touch event and just add a UIImageView as a subview of the button.
No such luck. Now I get the touch events, but the image doesn't display or animate...
Any thoughts?
I have spent quite a bit of time going down the "make a UIImageView-derived control respond to touches" road with no success. I can get it to display correctly and to animate correctly, but not to respond to touches.
So I changed approaches. I am now using a UIButton-derived control. UIButton inherits UIControl, which UIImageView is not. So UIButton has an addTarget: action:... method. I figured I could use this method to capture the touch event and just add a UIImageView as a subview of the button.
No such luck. Now I get the touch events, but the image doesn't display or animate...
Any thoughts?