             return
         }
         
+        #if swift(>=4.0)
         let focusPoint = self.previewLayer.captureDevicePointConverted(fromLayerPoint: touchPoint)
+        #else
+        let focusPoint = self.previewLayer.captureDevicePointOfInterest(for: touchPoint)
+        #endif
         
         showFocusViewAtPoint(touchPoint)
         

    
    open class func checkCameraPermission(_ handler: @escaping (_ granted: Bool) -> Void) {
        func hasCameraPermission() -> Bool {
            return AVCaptureDevice.authorizationStatus(for: .video) == .authorized
        }
        
        func needsToRequestCameraPermission() -> Bool {
            return AVCaptureDevice.authorizationStatus(for: .video) == .notDetermined
        }
        
        hasCameraPermission() ? handler(true) : (needsToRequestCameraPermission() ?
            AVCaptureDevice.requestAccess(for: .video, completionHandler: { granted in
                DispatchQueue.main.async(execute: { () -> Void in
                    hasCameraPermission() ? handler(true) : handler(false)
                })
            }) : handler(false))
    }
    
    open var didCancel: (() -> Void)?

                self.currentCapturer = capturer
            }
        } else {
            if let stillImageOutput = self.captureOutput as? AVCaptureStillImageOutput {
                #if swift(>=4.0)
                guard let connection = stillImageOutput.connection(with: .video) else { return }
                #else
                guard let connection = stillImageOutput.connection(withMediaType: AVMediaTypeVideo) else { return }
                #endif
                
                connection.videoOrientation = self.currentOrientation.toAVCaptureVideoOrientation()
                connection.videoScaleAndCropFactor = self.zoomScale
                
