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);

}

 

posted @ 2017-10-09 16:50  jsonLing  阅读(1272)  评论(1编辑  收藏  举报