질문에서 볼 수 있듯이 GPUImageview를 사용했습니다. GPUImageview는 OpenGL을 사용하므로 UIGraphicsBeginImageContextWithOptions
을 사용하여 목표를 달성 할 수 있습니다.
이 방법을 사용하면 목표를 달성 할 수 있습니다.
- (UIImage *)snapshot:(UIView *)view
{
UIGraphicsBeginImageContextWithOptions(view.bounds.size, YES, 0);
[view drawViewHierarchyInRect:view.bounds afterScreenUpdates:YES];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return image;
}
자세한 내용은 아래 링크를 클릭하십시오.
On iOS 7 and later, how do I take a snapshot of my view and save the result in a UIImage?
와우. 당신은 형제. 재 경기에 감사드립니다. 그것은 작동합니다. –
도와 드리겠습니다. –