         let doubleTap = UITapGestureRecognizer(target: self, action: #selector(didReceiveDoubleTap(_:)))
         doubleTap.numberOfTapsRequired = 2
         self.view.addGestureRecognizer(doubleTap)
+        
+        let pinch = UIPinchGestureRecognizer(target: self, action: #selector(didReceivePinch(_:)))
+        self.view.addGestureRecognizer(pinch)
     }
 
     override func didReceiveMemoryWarning() {

        scrollView.contentSize = imageView.frame.size
        
        // Calculate the min scale factor and max scale factor
        scrollView.minimumZoomScale = 0.5
        scrollView.maximumZoomScale = 2.0
    }

    private func resetScrollView() {
        scrollView.contentOffset = CGPointZero
        scrollView.zoomScale = 1.0
    }
}

            return true
        }
        
//        if scrollView.contentOffset.x >= CGRectGetWidth(view.bounds) || scrollView.contentOffset.x <= 0 {
//            return true
//        }
        
        return false
    }
