I need a photo viewer control. When I tap to UIImageView, the image of the UIImageView should be the only thing on the screen.
For this, I created a new ViewController called ImageViewController and a bigger UIImageView inside.
Now I am trying to set the 2nd imageview’s image from 1st controller.
Is there a good way to do that?
For thumbnail(small image) I would create a UIButton instead of UIImageview. You can set the image of the button. You can add a target method to button to create and show the view of the ImageViewController.
Implement a method in ImageViewController like initWithImage:(UIImage *)imageToShow. In that method set the image to an iVar(member variable). Then in viewDidLoad of ImageViewController set the image of imageView.
Now you can create an ImageViewController with the image and show in your target method.