I have a viewA that contains a GLKView and subviews as UIImageView. How can I snapshot hold of viewA to an image? I'm using this code, work good for any kind of view but GLKView
- (UIImage *) takeSnapshot
{
UIGraphicsBeginImageContextWithOptions(self.bounds.size, NO, [[UIScreen mainScreen] scale]);
[self.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage * img = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return img;
}