Type Property

maxAvailableTorchLevel

Declaration

class let maxAvailableTorchLevel: Float

Discussion

This constant always represents the maximum available torch level, independent of the actual maximum value currently supported by the device. Thus, pass this constant to the setTorchModeOn(level:) in situations where you want to specify the maximum torch level without having to worry about whether the device is overheating and might not accept a value of 1.0 as the maximum.

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 isTorchActive: Bool

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

var torchLevel: Float

The current torch brightness level.

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.

enum AVCaptureDevice.TorchMode

Constants to specify the capture device’s torch mode.