搜索
您的当前位置:首页正文

iOS7 后的屏幕截图方式

来源:知库网
- (UIImage *)snapshot:(UIView *)view

{

UIGraphicsBeginImageContextWithOptions(view.bounds.size, YES, 0);

[view drawViewHierarchyInRect:view.bounds afterScreenUpdates:YES];

UIImage *image = UIGraphicsGetImageFromCurrentImageContext();

UIGraphicsEndImageContext();

return image;

}

Top