【问题标题】:Autorotation in UINavigationControllerUINavigationController 中的自动旋转
【发布时间】:2010-08-29 21:52:12
【问题描述】:

有一个 UINavigationControllerrootViewController(作为 root)和 secondViewController(作为孩子)。 rootViewController 应该能够旋转到任何方向(按预期工作,我只是覆盖了 shouldAutorotateToInterfaceOrientation),但 secondViewController 应该可以工作仅纵向模式(这里,我将 shouldAutorotateToInterfaceOrientation 设置为

interfaceOrientation == UIInterfaceOrientationPortrait

问题:从 rootViewController 在横向 导航到 secondViewController 后, secondViewController 不会将其 UI 切换回纵向。有正确的方法吗?

【问题讨论】:

    标签: cocoa-touch uinavigationcontroller orientation autorotate


    【解决方案1】:

    试着放一个

    [super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];  
    

    在您在那里声明之后。看看这是否有效。

    【讨论】:

      猜你喜欢
      • 2010-11-01
      • 2010-11-06
      • 1970-01-01
      • 1970-01-01
      • 2010-11-03
      • 2010-11-14
      • 2011-09-29
      • 1970-01-01
      • 2012-04-07
      相关资源
      最近更新 更多