Instance Property

isTorchActive

A Boolean value indicating whether the device’s torch is currently active.

Declaration

var isTorchActive: Bool { get }

Discussion

A torch must be present on the device and currently available before it can be active.

You can observe changes to the value of this property using Key-value observing.

See Also

Managing Torch Settings

var hasTorch: Bool

A Boolean value that specifies whether the capture device has a torch.

var isTorchAvailable: Bool

Indicates whether the torch is currently available for use.

var torchLevel: Float

The current torch brightness level.

enum AVCaptureDevice.TorchMode

Constants to specify the capture device’s torch mode.

func isTorchModeSupported(AVCaptureDevice.TorchMode) -> Bool

Returns a Boolean value that indicates whether the device supports the specified torch mode.

func setTorchModeOn(level: Float)

Sets the illumination level when in torch mode.