https://developer.apple.com/library/content/qa/qa1817/_index.html#//apple_ref/doc/uid/DTS40014134
- (UIImage *)snapshot:(UIView *)view |
{ |
UIGraphicsBeginImageContextWithOptions(view.bounds.size, YES, 0); |
[view drawViewHierarchyInRect:view.bounds afterScreenUpdates:YES]; |
UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); |
UIGraphicsEndImageContext(); |
|
return image; |
} |