- (void)action_save_image:(id)sender
{
//UIImageWriteToSavedPhotosAlbum(image_gallery.image, nil, nil, nil);
UIImageWriteToSavedPhotosAlbum(image_gallery.image,self,(SEL)@selector(image:didFinishSavingWithError:contextInfo:), nil);
}
#if 1
- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo
{
if (error == nil)
show_alert_view(@"This picture has been saved to your photo album.", @"Picture Saved");
else
show_alert_view(@"Please try it again later.", @"Saving Failed");
}
#endifiphone开发——保存图片到相册及容错处理
最新推荐文章于 2026-07-06 10:39:32 发布
本文介绍了一个简单的iOS应用程序功能,即如何将当前显示的图片保存到用户的相册中,并通过一个回调方法来告知用户操作是否成功。
353

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



