我想在拍摄照片或视频时选择图像或视频作为一种选择。当我似乎单击该选项时,应用程序崩溃了。我正在使用 ios 6,当应用程序尝试搜索现有图像和视频时,苹果似乎包含了一些隐私问题。除此之外,我应该仍然使用 UIImagePickerControllerSourceTypeSavedPhotosAlbum 还是使用其他东西?
我的部分代码:
if (buttonIndex == 2) {
imgpPicker = [[UIImagePickerController alloc] init];
imgpPicker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
imgpPicker.mediaTypes = [NSArray arrayWithObjects:(NSString *)kUTTypeMovie,(NSString *)kUTTypeImage,nil];
popOverView = [[UIPopoverController alloc] initWithContentViewController:imgpPicker];
[popOverView presentPopoverFromRect:self.view.bounds inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
}
调试器上出现的错误是信号 SIGABRT:
*** Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES'
*** First throw call stack:
(0x36a732a3 0x33e9a97f 0x36a731c5 0x3777d897 0x3777d6a1 0x3777d65b 0x3777ce1b 0x3777cb45 0x37735767 0x377355c7 0x377355c7 0x3772fe53 0x377177e5 0x377172cb 0x37b00b95 0x115313 0x378d6ccb 0x378000ad 0x3780005f 0x3780003d 0x377ff8f3 0x377ffde9 0x377285f9 0x37715809 0x37715123 0x3644d5a3 0x3644d1d3 0x36a48173 0x36a48117 0x36a46f99 0x369b9ebd 0x369b9d49 0x3644c2eb 0x37769301 0xe1763 0xe14c0)
libc++abi.dylib: terminate called throwing an exception
(lldb)
应用程序的隐私也在设置中设置为开启。
难道我做错了什么?
任何指导或提示都会非常有帮助。对不起,如果问题很模糊。如果需要更多信息,我可以提供...