如何将UITabBarController NavigationController选项卡扩展到屏幕顶部?

时间:2020-10-14 23:18:00

标签: ios swift uitabbarcontroller

我似乎无法弄清楚如何以编程方式使UITabBarController的导航控制器选项卡全屏显示。它通过情节提要板起作用,但是我需要以编程方式创建选项卡栏,并且它们会弹出,如下图所示。我希望那些没有弹出的后退箭头。

是否可以通过编程使它们全屏显示?我到处搜索,没有找到Swift的任何内容。

Showing Tab Bar Nav Controller Unwanted Tab Popout

1 个答案:

答案 0 :(得分:0)

let myViewController = UIViewController()
myViewController.modalPresentationStyle = .fullScreen // you can display in fullscreen