Contents

hasTorch

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

Declaration

var hasTorch: Bool { get }

Discussion

A torch is a light source, such as an LED flash, that’s available on the device and used for illuminating captured content or providing general illumination. This property reflects whether the current device has such illumination hardware built-in.

Even if the device has a torch, that torch might not be available for use, so check the value of the isTorchAvailable property before using it.

This property is key-value observable.

See Also

Configuring torch settings