保存照片到系统相册(Photo Album)

Posted

tags:

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

actionClick:方法里调用:

UIImageWriteToSavedPhotosAlbum(self.image, self, @selector(image:didFinishSavingWithError:contextInfo:), NULL);

这个时候,我们想知道保存是否成功,所以需要制定回调方法

// 指定回调方法
- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo
{
    if(!error){
        NSLog(@"save success");
    }else{
        NSLog(@"save failed");
    }
}

 

以上是关于保存照片到系统相册(Photo Album)的主要内容,如果未能解决你的问题,请参考以下文章