This is actually a follow up to this question - How can I display image on fullscreen when user taps on my UIImage in Swift?
I managed to add a tap listener to my uiimageview, but now I would like to expand it when user clicks it. I have an iboutlet for that photo:
@IBOutlet weak var requestPhoto: UIImageView!
and then the listener so far prints this string:
func tapHandler(sender: UITapGestureRecognizer) {
if sender.state == .Ended {
print("photo tapped")
}
}
Now instead of printing the string I want to show the photo on the full screen, but so that it could work on any size of the iphone screens - is there a way of doing that directly from the code?