- (UIImage *)cutFromView:(UIView *)view { UIGraphicsBeginImageContextWithOptions(view.bounds.size, YES, 0.0); [view.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *img = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); return img; }
时间: 2024-11-05 22:50:36