PinchToZoomImageView
is a drop-in replacement for UIImageView
that supports pinching, panning, and rotating. Use cases include any occurences of an image that is zoomable. This was inspired by InstaZoom and ZoomRotatePanImageView.
- Supports pinching, panning, and rotating.
- Works when used in a
UIViewController
orUIScrollVieController
(e.g.UICollectionViewController
,UITableViewController
, etc.). - Shows the pinched image overtop everythingls else on the screen, with the exception of the status bar.
- Fully configurable in Interface Builder and code.
- Example app to demonstrate the various configurations.
CocoaPods is a dependency manager for Cocoa projects.
CocoaPods 0.36 adds supports for Swift and embedded frameworks. You can install it with the following command:
$ gem install cocoapods
To integrate PinchToZoomImageView
into your Xcode project using CocoaPods, specify it in your Podfile
:
pod 'PinchToZoomImageView'
Then, run the following command:
$ pod install
In case Xcode complains ("Cannot load underlying module for PinchToZoomImageView") go to Product and choose Clean (or simply press ⇧⌘K).
If you prefer not to use CocoaPods, you can integrate PinchToZoomImageView
into your project manually.
- Supported build target - iOS 8.2+ (Xcode 8.3.2+)
PinchToZoomImageView
is a subclass of UIImageView
. Use PinchToZoomImageView
just as you would a normal UIImageView
.
PinchToZoomImageView
can be used in either Interface Builder or code. In order to enable/disable pinching, update the isPinchable
property.
PinchToZoomImageView
is developed by Josh Sklar at StockX and is released under the MIT license. See the LICENSE
file for details.
You can follow or drop me a line on my Twitter account. If you find any issues on the project, you can open a ticket. Pull requests are also welcome.