我有一个通用的横向模式的应用程序。 SKStoreProductViewController在iPad上正常工作。但iPhone ios 7崩溃。即使我将SKStoreProductViewController设置为在iPhone上以纵向显示。SKStoreProductViewController在iPhone上崩溃iOS 7的景观应用程序
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
NSLog(@"iphone portrait");
return UIInterfaceOrientationPortrait;
}
else
return [super preferredInterfaceOrientationForPresentation];
}
SKStoreProductViewController在iPhone iOS 7上的肖像上显示,但是当我旋转手机时,它崩溃了。我收到错误消息称:
*终止应用程序由于未捕获的异常“UIApplicationInvalidInterfaceOrientation”,理由是:“支持的方向与应用程序中没有共同的方向,并shouldAutorotate将返回YES”
任何人知道如何解决问题?
谢谢
你看看@ http://stackoverflow.com/questions/12540597/supported-orientations-has-no-共同的方向与应用程序和肩膀? – Daniel