FullScreenCamera icon indicating copy to clipboard operation
FullScreenCamera copied to clipboard

Crashes if you switch cameras and turn the flash on

Open wizard1066 opened this issue 7 years ago • 1 comments

Comment says it all. CRASHES if you use the selfie view with the flash on.

wizard1066 avatar Aug 20 '17 16:08 wizard1066

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
               }

lukelucas247 avatar Feb 21 '18 11:02 lukelucas247