Pinchzoom demo in swift

Download EFImageViewZoom.swift File

https://github.com/ezefranca/EFImageViewZoom

Write following code in your view controller

import UIKit

class ViewController: UIViewController, EFImageViewZoomDelegate {

    @IBOutlet var imageViewZoom: EFImageViewZoom!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.imageViewZoom._delegate = self
        self.imageViewZoom.image = UIImage(named: "14bis.png")
       // self.imageViewZoom.contentMode = .left
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
}