title: iOS: what's the fastest, most performant way to make a screenshot programmatically?
body: <p>in my iPad app, I'd like to make a screenshot of a UIView taking a big part of the screen. Unfortunately, the subviews are pretty deeply nested, so it takes to long to make the screenshot and animate a page curling afterwards.</p>
  
  <p>Is there a faster way than the "usual" one?</p>
  
  <pre><code>UIGraphicsBeginImageContext(self.bounds.size);
  [self.layer renderInContext:UIGraphicsGetCurrentContext()];
  UIImage *resultingImage = UIGraphicsGetImageFromCurrentImageContext();
  UIGraphicsEndImageContext();
  </code></pre>
  
  <p>If possible, I'd like to avoid caching or restructuring my view.</p>