Latest 0.1.8
License MIT
Platforms ios 8.0, requires ARC
Frameworks UIKit

ZoomableUIView is a protocol that any UIView can conform to in order to be able to zoom and pan views without using UIScroll View. Particularly handy for views within UIScrollViews

ZoomableUIView is using swift3.


The simple code to get ZoomableUIView running in your own app.

  • In case you installed ZoomableUIView via CocoaPods you need to import it (add this somewhere at the top of your source code file):
    import ZoomableUIView
  • When you want to conform to the protocol:
     class CustomView: UIView, ZoomableUIView
  • Or:
     extension CustomView: ZoomableUIView
  • If you want to set the view zoomable:
  • When you want to reset the zoom:
  • Mandatory protocol conformance

Works like UIScrollViewDelegate’s viewForZooming. May well be that you want to use self in this case but you may want the current view to handle the zoom recognition and a subview to be zoomed, in that case return the subview in this func

    func viewForZooming() -> UIView

Set zooming options such as min and max zoom

   func optionsForZooming() -> ZoomableViewOptions


UIKit must be imported. If you are using ZoomableUIView in an App Extension, you must add EXTENSION to your Other Swift Flags Build Settings.


ZoomableUIView is available through CocoaPods. To install
it, simply add the following line to your Podfile:

    pod "ZoomableUIView"

In case you don’t want to use CocoaPods – just copy the files ZoomableUIView/ZoomableUIView.swift & ZoomableUIView/CGAffineTransform.swift to your Xcode project.


Author: James Coughlan


**ZoomableUIView** is available under the MIT license. See the LICENSE file for more info.

Latest podspec

    "name": "ZoomableUIView",
    "platforms": {
        "ios": "8.0"
    "summary": "Zoomable UIView protocol to zoom UIView without a UIScrollView.",
    "requires_arc": true,
    "version": "0.1.8",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "James Coughlan": "[email protected]"
    "homepage": "",
    "source": {
        "git": "",
        "tag": "0.1.8"
    "frameworks": "UIKit",
    "source_files": "ZoomableUIView/**/*.{swift}",
    "pushed_with_swift_version": "3.0"

Pin It on Pinterest

Share This