相機,相冊

訪問權限 http://www.lxweimin.com/p/2e01fa3fefe8

保存圖片到相冊


 //保存到相冊
#import <Photos/Photos.h>
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:didFinishSavingWithError:contextInfo:), nil);
-(void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo
{
    NSString *msg = nil ;
    if(error){
        msg = @"保存圖片失敗" ;
    }else{
        msg = @"保存圖片成功" ;
    }
//    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"保存圖片結果提示"        message:msg delegate:self  cancelButtonTitle:@"確定" otherButtonTitles:nil];
//    [alert show];
}

系統相冊類型

###保存在本機的圖片
UIImagePickerControllerSourceTypeSavedPhotosAlbum
D52322227955848D1F336C9A91A4F794.png
###本機相冊和iCold相冊,沒有icloud會崩潰
UIImagePickerControllerSourceTypePhotoLibrary
IMG_2188.PNG

![Uploading D52322227955848D1F336C9A91A4F794_492012.png . . .]

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容