I have a custom graphic that I am using as the background to a UIView. On this image there are some text that I would like to create clickable hotspots around. For instance, one says “Next” and one says “Previous”, I’d like these to be clickable hotspots that I can capture the event and change a UITextView with some data. So far I have been unable to find any help on defining clickable regions on a UIImageView. Thanks for the help!
Share
I would just create invisible UIButtons that overlay the area you want to be clickable. In Interface Builder, just create the button and set its type to custom and don’t provide any text or images. In code:
Then use the button’s tag to determine which button was clicked inside of
clickedHotspot: