首页 文章

在风景中查看显示为肖像

提问于
浏览
0

我有一个只在横向模式下运行的应用程序...它工作得很好,但我确实在我的应用程序中创建了另一个视图,他的xib是“landscape”,没有使用autolayout并且在我的控制器中实现了shouldAutoRotate ..但是我在这个视图中输入,视图与xib完全不同

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
    return ((toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft) || (toInterfaceOrientation == UIInterfaceOrientationLandscapeRight));
}

xib的打印http://imageshack.us/photo/my-images/38/3t2b.png/

ipad的打印http://imageshack.us/photo/my-images/196/nqku.png/

2 回答

  • 0

    在信息plist检查值

    支持的界面方向

    只保留这两项

    • 风景(左主页按钮)

    • 风景(右侧主页按钮)

  • 1

    我使用以下方法解决问题:

    [self presentViewController:_inAppPurchaseView animated:FALSE completion:nil];
    

    代替:

    [self.window addSubView:_inAppPurchase.view];
    

相关问题