当我要求使用 PhotoAlbum 中的照片显示 imagePicker 时,我崩溃了:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </var/mobile/Applications/9D75B5EC-6CC9-4306-B4A1-88C369FEEC6C/AlterGeo.app> (loaded)' with name 'PLUIPrivacyViewController''
- (void)showImagePicker {
UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
if ([imagePicker respondsToSelector:@selector(setAllowsEditing:)]) {
[imagePicker setAllowsEditing:_editable];
}
[imagePicker setSourceType:UIImagePickerControllerSourceTypePhotoLibrary];
[imagePicker setDelegate:self];
[[self getNavigationController] presentModalViewController:imagePicker animated:YES];
[imagePicker release];
}
- (UINavigationController *)getNavigationController {
if (_delegate && [_delegate isKindOfClass:[UIViewController class]]) {
return [(UIViewController *)_delegate navigationController];
}
return nil;
}
如果它第一次启动并且我的 ios 请求权限(UIAlertView 允许/拒绝)它会崩溃,但如果我已经授予权限(允许)它会正常工作。我该如何解决?