I am trying to workout how to implement a UIImage
that has pinch/double tap to zoom. Is this possible with a standard UIImageView
?
Looking at other questions at documentation it has to be completed with a UIScrollView
?
Source: https://developer.apple.com/library/ios/documentation/windowsviews/conceptual/UIScrollView_pg/ZoomingByTouch/ZoomingByTouch.html
The issue I see is that the above link suggests using initWithImage
on the scrollView, but that is not available?
I am looking to implement an Image that is full screen (no larger), if the image is larger it should scale Aspect to Fit into the full screen. The user can then double tap or Pinch to zoom into the image. What is the correct approach for this?
Never try to zoom an image itself - it consumes just too much time. Instead, as you've mentioned, zoom the view. It can be made with UIScrollView
using almost default parameters.
Here is how: How to zoom in/out an UIImage object when user pinches screen?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With