I have a UIView that has:
- Image View
- Text View
- Scroll View (it has multiple images which are dynamically created in run time)
what I need to do is: when I select an Image (either the first image ,or the one from the scroll view) a pop up window shall appear with the image inside.
I prepared the pop up view but now all I need is a way to identify the image being pressed by the user, so that I can call the pop up controller and view the image. thx in advanced.
Simple solution: Add tap gesture recognizer to every imageview. Then in gesture recognizer selector you can use view property of the sender, which is the view gesture is attached to.
Example:
then in handleTaps you can do the following
*Don't forget to set imageView.userInteractionEnabled = YES;
swift tested code