IOS 判断相册是否允许访问
ALAssetsLibrary*library=[[ALAssetsLibraryalloc]init];
[librarywriteImageToSavedPhotosAlbum:p_w_picpath.CGImageorientation:p_w_picpath.p_w_picpathOrientationcompletionBlock:^(NSURL*asSetUrl,NSError*error){
if(error){
UIAlertView*alert=[[UIAlertViewalloc]initWithTitle:@"保存图片失败"
message:@"请打开设置-隐私-照片来进行设置"
delegate:nil
cancelButtonTitle:@"确定"
otherButtonTitles:nil,nil];
[alertshow];
[alertrelease];
}else{
UIAlertView*alert=[[UIAlertViewalloc]initWithTitle:@"保存图片成功"
message:nil
delegate:nil
cancelButtonTitle:@"确定"
otherButtonTitles:nil,nil];
[alertshow];
[alertrelease];
}
}];
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。