UIView截图,清晰版本

2019-10-15  本文已影响0人  Smallwolf_JS
+ (UIImage *)getImageViewWithView:(UIView *)view{
    UIGraphicsBeginImageContextWithOptions(view.bounds.size, NO, 0.0);
    [view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    return image;
}
上一篇 下一篇

猜你喜欢

热点阅读