OGeek|极客世界-中国程序员成长平台

标题: ios - ViewController ios swift中的顶部栏显示上一个顶部栏 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-11 18:27
标题: ios - ViewController ios swift中的顶部栏显示上一个顶部栏

从左至右.. 这是主页。当我单击重新尝试按钮时,将打开新的 View Controller 哪个名称级别页面(左起第二个)

左起第二个。这是水平页面。运行时显示的顶部栏与主页相同。

左起第三个。这是我的关卡页面 Storyboard。顶部栏显示标题和返回按钮

请查看以下屏幕截图以获取更多信息。

Image

我的问题是为什么关卡页面在我运行时不显示标题和后退按钮,就像我的 Storyboard 一样......?以及如何让关卡页面显示标题和返回按钮?

我已经嵌入导航 Controller ..请帮帮我..



Best Answer-推荐答案


let navController = self.storyboard!.instantiateViewControllerWithIdentifier("YouNewNavigationControllerIdentifier") as! UINavigationController
self.presentViewController(navController, animated: true)

希望这会奏效...!!

关于ios - ViewController ios swift中的顶部栏显示上一个顶部栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41395748/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4