我有一个通用的横屏应用程序。在iPad上,SKStoreProductViewController运行良好。但是,在iPhone上的ios 7上会崩溃。即使我将SKStoreProductViewController设置为在iPhone上呈现为竖屏也是如此。
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
NSLog(@"iphone portrait");
return UIInterfaceOrientationPortrait;
}
else
return [super preferredInterfaceOrientationForPresentation];
}
SKStoreProductViewController 在 iPhone iOS 7 上只能显示竖屏,但当我旋转手机时,它会崩溃。 我收到错误消息:
* Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation',reason: 'Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES'
请问有人知道如何解决这个问题吗?
谢谢