Open wizard1066 opened 7 years ago
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
}
Comment says it all. CRASHES if you use the selfie view with the flash on.