GLKView とサブビューを UIImageView として含む viewA があります。viewA のホールドをイメージにスナップショットするにはどうすればよいですか? 私はこのコードを使用していますが、どの種類のビューでもうまく機能しますが、GLKView
- (UIImage *) takeSnapshot
{
UIGraphicsBeginImageContextWithOptions(self.bounds.size, NO, [[UIScreen mainScreen] scale]);
[self.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage * img = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return img;
}