闪光灯-AVCaptureDevice (AVCaptureDeviceFlash)

闪光灯是否存在

@property(nonatomic, readonly) BOOL hasFlash;

闪光灯是否可用

@property(nonatomic, readonly, getter=isFlashAvailable) BOOL flashAvailable

闪光灯是否活跃中

@property(nonatomic, readonly, getter=isFlashActive) BOOL flashActive

设置闪光灯模式

@property(nonatomic) AVCaptureFlashMode flashMode
- (BOOL)isFlashModeSupported:(AVCaptureFlashMode)flashMode
typedef NS_ENUM(NSInteger, AVCaptureFlashMode) {
    AVCaptureFlashModeOff  = 0,
    AVCaptureFlashModeOn   = 1,
    AVCaptureFlashModeAuto = 2,
} NS_AVAILABLE(10_7, 4_0) __TVOS_PROHIBITED;

你可能感兴趣的:(闪光灯-AVCaptureDevice (AVCaptureDeviceFlash))