From iPhone Development Wiki
Revision as of 05:23, 16 February 2014 by PoomSmart (talk | contribs) (To be improved later.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.


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.