调用闪光灯

AVCaptureDevice *device = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo];

[device lockForConfiguration:nil];
if (device.torchMode == AVCaptureTorchModeOff) {
[device setTorchMode: AVCaptureTorchModeOn];
}else{
[device setTorchMode: AVCaptureTorchModeOff];
}
【调用闪光灯】[device unlockForConfiguration];

    推荐阅读