Instance Method

isTorchModeSupported(_:)

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

Declaration

func isTorchModeSupported(_ torchMode: AVCaptureDevice.TorchMode) -> Bool

Parameters

torchMode

The desired torch mode. For a list of possible values, see AVCaptureDevice.TorchMode.

Return Value

true if torchMode is supported, otherwise false.

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 setTorchModeOn(level: Float)

Sets the illumination level when in torch mode.

enum AVCaptureDevice.TorchMode

Constants to specify the capture device’s torch mode.