UIGraphicsBeginImageContext(self.view.bounds.size);
[View1.layer renderInContext:UIGraphicsGetCurrentContext()];
[View2.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIImageWriteToSavedPhotosAlbum(image,self, nil, nil);
将UIView转为图片,并保存至相册
最新推荐文章于 2020-12-20 17:17:03 发布