+ (UIImage *) imageWithView:(UIView *)selectView
{
UIGraphicsBeginImageContextWithOptions(selectView.bounds.size, selectView.opaque, 0.0);
[selectView.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage * image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return image;
}
iOS 局部快照的实现(UIView to UIImage)
最新推荐文章于 2023-10-08 14:40:02 发布