AVFlashlight: Difference between revisions

From iPhone Development Wiki
(To be improved later.)
(No difference)

Revision as of 05:23, 16 February 2014

AVFlashlight is a private class introduced in iOS 7 for turning the device's LED flash on or off. The example application that use this class is Control Center in SpringBoard.

Methods

Signature +(BOOL)hasFlashlight;
Available in 7.0 —

The method +[AVFlashlight hasFlashlight] indicates the LED flash availability.

Signature -(BOOL)setFlashlightLevel:(float)level withError:(NSError *)error;
Available in 7.0 —

The method -[AVFlashlight setFlashlightLevel:withError:] is used for setting the flashlight level.