我有一个仅在横向模式下运行的应用程序...它运行良好,但我确实在我的应用程序中创建了另一个视图,他的xib是“landscape”,没有使用autolayout并且在我的控制器中实现了shouldAutoRotate。 。但是当我进入这个视图时,视图与xib完全不同
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
return ((toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft) || (toInterfaceOrientation == UIInterfaceOrientationLandscapeRight));
}
答案 0 :(得分:1)
在信息plist检查值
支持的界面方向
只保留这两项
答案 1 :(得分:0)
我使用以下方法解决了我的问题:
[self presentViewController:_inAppPurchaseView animated:FALSE completion:nil];
而不是:
[self.window addSubView:_inAppPurchase.view];