title: How to take a screenshot programmatically in iOS?
body: <p>I have a <code>UIView</code> that uses both <code>UIKit</code> control and <code>OpenGL</code>. I'd like to get a screenshot of that view programatically.</p>
  
  <p>If I use <code>UIGraphicsGetImageFromCurrentImageContext()</code>, the <code>OpenGL</code> content is blank;
  If I use the <code>glReadPixels(...)</code> method, the UIKit content is blank;</p>
  
  <p>I'm confused as how to take a complete screenshot.
  Thank you!</p>