我的应用程序(iPad;iOS6)是一个仅适用于风景的应用程序,但当我尝试使用UIPopoverController显示图片库时,它抛出了这个错误:Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES.我已经尝试更改了很多代码,但没有成功。
发布于 2012-09-23 02:02:12
我也有同样的问题,这个答案https://stackoverflow.com/a/12523916适用于我。我想知道是否有更优雅的解决方案。
My code:
UIImagePickerController *imagePickerController = [[NonRotatingUIImagePickerController alloc] init];
imagePickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
UIPopoverController *popoverVC = [[UIPopoverController alloc] initWithContentViewController:imagePickerController];
[popoverVC presentPopoverFromRect:frame // did you forget to call this method?
inView:view
permittedArrowDirections:UIPopoverArrowDirectionAny
animated:YES];https://stackoverflow.com/questions/12540597
复制相似问题