I am showing preview to the user and after 3s, the image is taken.
[stillImageOutput captureStillImageAsynchronouslyFromConnection:videoConnection completionHandler: ^(CMSampleBufferRef imageSampleBuffer, NSError *error)
{
[session stopRunning];
NSData *imageData = [AVCaptureStillImageOutput jpegStillImageNSDataRepresentation:imageSampleBuffer];
}];
Because captureStillImageAsynchronouslyFromConnection takes some time, if i move phone just before 3s have passed, the picture taken will not be the same as the one shown in preview (AVCaptureVideoPreviewLayer).
Can i avoid this?