我有一個通用的橫向模式的應用程序。 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