ALAssetsLibrary *library = [[ALAssetsLibrary alloc]init];
[library writeImageToSavedPhotosAlbum:p_w_picpath.CGImage orientation:p_w_picpath.p_w_picpathOrientation completionBlock:^(NSURL *asSetUrl,NSError *error){
if (error) {
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"保存圖片失敗"
message:@"請打開 設置-隱私-照片 來進行設置"
delegate:nil
cancelButtonTitle:@"確定"
otherButtonTitles:nil, nil];
[alert show];
[alert release];
}else{
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"保存圖片成功"
message:nil
delegate:nil
cancelButtonTitle:@"確定"
otherButtonTitles:nil, nil];
[alert show];
[alert release];
}
}];
IOS 判斷相冊是否允許訪問
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.