UIViewController Image Touch Events
I have an开发者_StackOverflow中文版 image in a UIViewController which can be zoomed in and out. What I want is to include some areas of the image where the user can tap and more information shows up on that screen.
I was wondering how I should approach this?
Note, the image must be able to zoom in and out; and the areas where they touch would increase/decrease according to the image zoom. (If that is possible).
use UIPinchGesture Recognizer and UITabGesture Recognizer
You can use a UIScrollView for this. If you want certain areas to have info overlays like the map, you can store a list of "hot spots" and test touch events against the list and see if that area has been tapped.
精彩评论