     // Background View
     public func singleTapDetectedInView(view: UIView, touch: UITouch) {
         // Translate touch location to image view location
-        var touchX = touch.locationInView(view).x
-        var touchY = touch.locationInView(view).y
+        var touchX = touch.location(in: view).x
+        var touchY = touch.location(in: view).y
         touchX *= 1.0 / self.zoomScale
         touchY *= 1.0 / self.zoomScale
         touchX += self.contentOffset.x
         touchY += self.contentOffset.y
         
-        handleSingleTap(CGPointMake(touchX, touchY))
+        handleSingleTap(touchPoint: CGPoint(x: touchX, y: touchY))
     }
     
     public func doubleTapDetectedInView(view: UIView, touch: UITouch) {
         // Translate touch location to image view location
-        var touchX = touch.locationInView(view).x
-        var touchY = touch.locationInView(view).y
+        var touchX = touch.location(in: view).x
+        var touchY = touch.location(in: view).y
         touchX *= 1.0 / self.zoomScale
         touchY *= 1.0 / self.zoomScale
         touchX += self.contentOffset.x
         touchY += self.contentOffset.y
         
-        handleDoubleTap(CGPointMake(touchX, touchY))
+        handleDoubleTap(touchPoint: CGPoint(x: touchX, y: touchY))
     }
     
     public func tripleTapDetectedInView(view: UIView, touch: UITouch) {

            let newZoomScale = ((maximumZoomScale + minimumZoomScale) / 2.0)
            let xsize = bounds.size.width / newZoomScale
            let ysize = bounds.size.height / newZoomScale
            zoomToRect(CGRectMake(touchPoint.x - xsize / 2.0, touchPoint.y - ysize / 2.0, xsize, ysize), animated: true)
        }
        
        // Delay controls


    private func handleSingleTap(touchPoint: CGPoint) {
        dispatch_after(
            DispatchTime.now(dispatch_time_t(DispatchTime.now()), Int64(0.2 * Double(NSEC_PER_SEC))),
            DispatchQueue.main)
        {
            self.photoBrowser.toggleControls()
        }
