当前位置:首页 > 操作系统 > Ios

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:nilcancelButtonTitle:@"确定"otherButtonTitles:nil, nil]autorelease];

                [alert show];

                return;

    }

    else

    {

        alert = [[[ UIAlertView alloc]initWithTitle:@"保存失败"message:@"请打开设置-隐私-照片来进行设置"delegate:nilcancelButtonTitle:@"确定"otherButtonTitles:nil, nil]autorelease];

                [alert show];

                return;

    }

}


原文:http://liumenglin.blog.51cto.com/7734570/1584033


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!