iOS 中,一个 UITabBarController 管理着四个 UINavigationController,且每个 Navigation 都有自己的根视图,请问如何实现点击标签一时 UINavigationController1 的屏幕方向为 UpSideDown,点击标签二时 UINavigationController2 的方向为 LandScapeLeft???
iOS 中,一个 UITabBarController 管理着四个 UINavigationController,且每个 Navigation 都有自己的根视图,请问如何实现点击标签一时 UINavigationController1 的屏幕方向为 UpSideDown,点击标签二时 UINavigationController2 的方向为 LandScapeLeft???
1 回答796 阅读
2 回答600 阅读
1 回答578 阅读
2 回答578 阅读
1 回答679 阅读
630 阅读
以下方法仅对deploy target大于等于iOS6的工程有效,如果题主的应用需要支持iOS5(默哀),请pass。
preferredInterfaceOrientationForPresentation表示viewController初始显示时的方向;
supportedInterfaceOrientations是在该viewController中支持的所有方向;
shouldAutorotate表示是否允许旋屏。