Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [stillImageOutput captureStillImageAsynchronouslyFromConnection:videoConnection completionHandler: ^(CMSampleBufferRef imageSampleBuffer, NSError *error){
- @try {
- if (imageSampleBuffer != nil) {
- NSData *imageData = [AVCaptureStillImageOutput jpegStillImageNSDataRepresentation:imageSampleBuffer];
- UIImage *image = [[UIImage alloc] initWithData:imageData];
- [self setImageView:imageView1 withImage:image];
- }
- }@catch (NSException *exception) {
- }@finally {}
- }
- captureSession.sessionPreset = AVCaptureSessionPresetHigh;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement