6

我有一个 iOS 应用程序,我在其中展示了一个图像选择器

self.picker = [[UIImagePickerController alloc] init];
self.picker.delegate = self;
self.picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;

self.popover = [[UIPopoverController alloc] initWithContentViewController:self.picker];
[self.popover presentPopoverFromRect:CGRectMake(100, 100, 1, 1) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];

但是,该应用程序根本不请求权限,它只是显示错误消息“此应用程序无权访问您的照片或视频”。

关于可能导致这种情况的任何想法?

提前致谢!

4

2 回答 2

5

问题是 Info.plist 中未设置捆绑显示名称

于 2015-10-08T16:21:32.680 回答
0

在 iOS 9 中, UIPopoverController 已被弃用,为什么不使用 presentViewController 代替。

于 2015-10-08T08:13:05.397 回答