Steps:
1) You need to add UIImageView as a subset of UIScrollView .
2) Set the UITapGestureRecognizer in the scroll view and set the numberOfTapsRequired property to 1 .
3) In the gesture recognizer callback method, simply set the zoomScale property to the zoomScale view to the desired zoom value.
4) Remember to set maximumZoomScale and minimumZoomScale to UIScrollView .
source share