訪問權限 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 . . .]