iOS screenshot delay
<p>I'd like to quickly capture a screenshot for making a video of images. I'm currently using the following code however it's slightly delayed. Is there a better method for taking screenshots that will be quicker?</p>

<pre><code>CGSize imageSize = [[UIScreen mainScreen] bounds].size;
if (NULL != UIGraphicsBeginImageContextWithOptions)
  UIGraphicsBeginImageContextWithOptions(imageSize, NO, 1);
else
  UIGraphicsBeginImageContext(imageSize);
[self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *imageName = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
</code></pre>
