I’m developing an application to display a gallery of UIImages by using a UIScrollView, my question is, how to tap to zoom and double tap to zoom out, how does it work when handling with UIScrollView.
I’m developing an application to display a gallery of UIImages by using a UIScrollView
Share
You need to implement UITapGestureRecognizer – docs here – in your viewController
Basically this code is saying that when a
UITapGestureis registered inself.viewthe method tapOnce or tapTwice will be called inselfdepending on if its a single or double tap. You therefore need to add these tap methods to yourUIViewController:Hope that helps