             }
         }
         
-        if self.currentDevice?.isFocusModeSupported(.ContinuousAutoFocus) == false {
+        if self.currentDevice == nil || self.currentDevice?.flashAvailable == false {
             return
         }
         

        }
    }
    
    private func updateFlashButton() {
        struct FlashImage {
            

    public var didFinishCapturingImage: ((image: UIImage) -> Void)?
    
    public var cameraOverlayView: UIView?
    public var flashModel:AVCaptureFlashMode! {
        didSet {
            self.updateFlashButton()
            self.updateFlashMode()
            self.updateFlashModelToUserDefautls(self.flashModel)
        }
    }
    
