title: iOS swift 4 imageview under scrollview : double tap to zoom out
body: <p>I have already applied the image view to zoom in/out by pinch. That is easy. When it comes to applying double taps on the image view, the select method cannot be detected.</p>
  
  <p>I use Xcode 9 and swift 4 . Would you please tell me whether scrollview should apply the double tap gesture instead ? </p>
  
  <pre><code> var previewImage : UIImage? = nil
  
  
      override func viewDidLoad() {
          super.viewDidLoad()
  
          scrollView.minimumZoomScale = 1.0
          scrollView.maximumZoomScale = 6.0
          imageView.image = previewImage
  
          let doubleTap =  UITapGestureRecognizer.init(target: self, action: #selector(self.sampleTapGestureTapped(recognizer:)))
          doubleTap.numberOfTapsRequired = 2
          imageView.addGestureRecognizer(doubleTap)
          // Do any additional setu p after loading the view.
      } 
  
      @objc func sampleTapGestureTapped(recognizer: UITapGestureRecognizer) {
          print("Tapping working")
      }
  
  
  }
  
  extension PhotoReviewController: UIScrollViewDelegate {
  
      func viewForZooming(in scrollView: UIScrollView) -&gt; UIView? {
  
          return imageView
      }
  }
  </code></pre>