FullScreenCamera
FullScreenCamera copied to clipboard
Crashes if you switch cameras and turn the flash on
Comment says it all. CRASHES if you use the selfie view with the flash on.
Inside: func captureImage(completion: @escaping (UIImage?, Error?) -> Void) {}
Change:
settings.flashMode = self.flashMode
With:
if currentCameraPosition == .front {
settings.flashMode = AVCaptureDevice.FlashMode.off
} else if currentCameraPosition == .rear {
settings.flashMode = self.flashMode
}