开发者社区 问答 正文

UITabBarController管理着几个UINavigationController时怎么横屏?

iOS 中,一个 UITabBarController 管理着四个 UINavigationController,且每个 Navigation 都有自己的根视图,请问如何实现点击标签一时 UINavigationController1 的屏幕方向为 UpSideDown,点击标签二时 UINavigationController2 的方向为 LandScapeLeft???

展开
收起
a123456678 2016-07-27 15:42:23 1964 分享 版权
1 条回答
写回答
取消 提交回答
  • - (BOOL)shouldAutorotate
    {
        return [self.selectedViewController shouldAutorotate];
    }
    
     - (NSUInteger)supportedInterfaceOrientations
    {
        return [self.selectedViewController supportedInterfaceOrientations];
    }
    
     - (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
    {
        return [self.selectedViewController preferredInterfaceOrientationForPresentation];
    }
    2019-07-17 20:00:43
    赞同 展开评论
问答分类:
问答地址: