import UIKit

class ViewController: UIViewController, UIScrollViewDelegate
{
    @IBOutlet weak var myScrollView: UIScrollView!
    
    @IBOutlet weak var myImgView: UIImageView!
    
    
    func viewForZooming(in scrollView: UIScrollView) -> UIView?
    {
        return myImgView
    }

    func scrollViewDidEndZooming(_ scrollView: UIScrollView,
                                 with view: UIView?,
                                 atScale scale: CGFloat)
    {
        myScrollView.zoomScale = 1.0
    }

}

