iOS 保存图片到本地

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了iOS 保存图片到本地相关的知识,希望对你有一定的参考价值。

- (void)loadImageFinished:(UIImage *)image

{

    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:didFinishSavingWithError:contextInfo:), (__bridge void *)self);

}

 

 

- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo

{

    if (error == NULL) {

        

        [EJProgressHUD showSuccess:@"保存成功!"];

        

    }else

    {

        [EJProgressHUD showError:@"保存失败"];

    }

    // NSLog(@"image = %@, error = %@, contextInfo = %@", image, error, contextInfo);

}

 

以上是关于iOS 保存图片到本地的主要内容,如果未能解决你的问题,请参考以下文章