// 保存相册
- (IBAction)save:(id)sender {
// UIImage *image = [[SDImageCache sharedImageCache] imageFromDiskCacheForKey:self.item.image2];
// 保存到自己的相册
// 弹出对话框
UIImageWriteToSavedPhotosAlbum(_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:@"保存成功"];
}
}