Constants to specify the capture device’s torch mode.
SDKs
- iOS 4.0+
- macOS 10.7+
- Mac Catalyst 13.0+
Framework
- AVFoundation
Declaration
typedef enum AVCaptureTorchMode : NSInteger {
...
} AVCaptureTorchMode;
Constants to specify the capture device’s torch mode.
SDKs
Framework
typedef enum AVCaptureTorchMode : NSInteger {
...
} AVCaptureTorchMode;
AVCapture Torch Mode Off
The capture device torch is always off.
AVCapture Torch Mode On
The capture device torch is always on.
AVCapture Torch Mode Auto
The capture device continuously monitors light levels and uses the torch when necessary.
has Torch
A Boolean value that specifies whether the capture device has a torch.
torch Available
Indicates whether the torch is currently available for use.
torch Active
A Boolean value indicating whether the device’s torch is currently active.
torch Level
The current torch brightness level.
torch Mode
The current torch mode.
- is Torch Mode Supported:
Returns a Boolean value that indicates whether the device supports the specified torch mode.
- set Torch Mode On With Level: error:
Sets the illumination level when in torch mode.