isFlashEnabled
A Boolean value indicating whether the camera flash fires for this capture.
Declaration
var isFlashEnabled: Bool { get }Discussion
This property corresponds to the AVCapturePhotoSettings property flashMode.
If you specify a flash mode of AVCaptureDevice.FlashMode.auto when requesting a capture, the device automatically chooses whether to use the flash based on the scene contents at the moment of capture. Therefore, you don’t know whether the flash will fire until right before the moment of capture. When the photo output calls your photoOutput(_:willBeginCaptureFor:) method (or other delegate methods that occur later in the capture process), you can use this property to determine whether a capture uses the flash.