【问题标题】:Orientation doesnt work when i add tabBarController in splitView当我在 splitView 中添加 tabBarController 时,方向不起作用
【发布时间】:2012-03-14 06:19:05
【问题描述】:

在我的应用程序中,我在拆分视图的 RootViewController 中添加了 tabBarController。在该纵向模式下工作正常,但它的方向不会更改为横向模式。当我在 rootViewController 中添加 tabBarController 时,横向方向不会改变。

请建议我这样做的方法。

【问题讨论】:

    标签: objective-c xcode4.2 ipad


    【解决方案1】:

    确保标签栏控制器中包含的所有视图控制器都可以在所有方向上显示。有关详细信息,请参阅技术问答 QA1688https://developer.apple.com/library/ios/#qa/qa1688/_index.html

    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
    {
        return YES;
    }
    

    【讨论】:

    • 非常感谢它工作正常我忘了把这个方法放在一个视图控制器中。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-08-14
    • 2021-03-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-08-16
    相关资源
    最近更新 更多