The current torch mode.
- iOS 4.0+
- macOS 10.7+
- UIKit for Mac 13.0+Beta
Setting the value of this property also sets the torch level to its maximum current value.
Before setting the value of this property, call the
is method to make sure the device supports the desired mode. Setting the device to an unsupported torch mode results in the raising of an exception. For a list of possible values for this property, see
Before changing the value of this property, you must call
lock to acquire exclusive access to the device’s configuration properties. Otherwise, setting the value of this property raises an exception. When you finish configuring the device, call
unlock to release the lock and allow other devices to configure the settings.
You can observe changes to the value of this property using Key-value observing.