I was wondering if anyone could provide an example of how to take a screenshot which mixes OpenGL and UIKit elements. Ever since Apple made UIGetScreenImage()
private this has become a pretty difficult task because the two common methods Apple used to replace it capture only UIKit or only OpenGL.
This similar question references Apple's Technical Q&A QA1714, but the QA only describes how to handle elements from the camera and UIKit. How do you go about rendering the UIKit view hierarchy into an image context and then drawing the image of your OpenGL ES view on top of it like the answer to the similar question suggests?
This should do the trick. Basically rendering everything to CG and creating an image you can do whatever with.
Then, to create a screenshot