Advertisement
Guest User

Untitled

a guest
Aug 28th, 2015
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. AVCaptureDevice *device = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo];
  2. if ([device hasTorch])
  3. {
  4. [device lockForConfiguration:nil];
  5. //by these you can use Torch Flash Light..
  6. [device setTorchMode:AVCaptureTorchModeOn]; // use AVCaptureTorchModeOff to turn off
  7. [device unlockForConfiguration];
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement