【发布时间】:2018-07-22 07:20:31
【问题描述】:
当我使用 UITabbarController 时,我想只显示纵向屏幕而不旋转屏幕。
当我不使用 UITabBarController 时,我不旋转屏幕,它处于横向视图。
因此,我为不使用 UITabBarController 的 ViewController 设置了以下内容。
override var shouldAutorotate: Bool {
get {
return true
}
}
override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
get {
return .landscapeRight
}
}
在应用程序的规范中,我们进行以下设置。
我在故事板 1 中使用 UITabbarController。 enter image description here
我没有在故事板 2 中使用 UITabbarController。 enter image description here
我想创建一个应用程序来从情节提要 1 移动到情节提要 2。
我不知道如何仅在我使用 UITabBarController 的 ViewController 上垂直显示屏幕。
【问题讨论】:
-
希望这个问题对你有帮助:stackoverflow.com/questions/28938660/…
-
@MoayadAlkouz 谢谢。
标签: ios swift xcode uiviewcontroller uitabbarcontroller