/**
* 保存到相册
*/
- (IBAction)save
{
if (self.imageView.image == nil) {
[SVProgressHUD showErrorWithStatus:@"图片并没下载完毕!"];
return;
}
// 将图片写入相册
UIImageWriteToSavedPhotosAlbum(self.imageView.image, self, @selector(image:didFinishSavingWithError:contextInfo:), nil);
}
- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo
{
if (error) {
[SVProgressHUD showErrorWithStatus:@"保存失败!"];
} else {
[SVProgressHUD showSuccessWithStatus:@"保存成功!"];
}
}
下载单张图片到本地相册
最新推荐文章于 2024-11-06 16:50:20 发布
1655

被折叠的 条评论
为什么被折叠?



