Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- AVCaptureDevice *device = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo];
- if ([device hasTorch])
- {
- [device lockForConfiguration:nil];
- //by these you can use Torch Flash Light..
- [device setTorchMode:AVCaptureTorchModeOn]; // use AVCaptureTorchModeOff to turn off
- [device unlockForConfiguration];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement