标签:ios 图片保存手机相册
UIImageWriteToSavedPhotosAlbum(app.erweiImg, self, @selector(image:didFinishSavingWithError:contextInfo:), nil);
- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo
{
UIAlertView *alert;
if (error == nil)
{
alert = [[[UIAlertView alloc]initWithTitle:@"温馨提示" message:@"保存成功" delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil, nil]autorelease];
[alert show];
return;
}
else
{
alert = [[[UIAlertView alloc]initWithTitle:@"保存失败" message:@"请打开 设置-隐私-照片 来进行设置" delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil, nil]autorelease];
[alert show];
return;
}
}
标签:ios 图片保存手机相册
原文地址:http://liumenglin.blog.51cto.com/7734570/1584033