阅读背景:

iOS UIView、UIImage、NSData转换_ChadPro

来源:互联网 

1. UIView -> UIImage

-(UIImage *)getImageFromView:(UIView *)view{
    UIGraphicsBeginImageContext(view.bounds.size);
    [view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    return image;
}-(UIImage *)getImageF



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: