我有两个 ViewControllers -- 一个有 Storyboard,一个没有。这两个 View Controller 在顶部都有自己的导航栏。现在,当我使用 self.presentViewController(editorViewController, animated: true, completion: nil)
时,我的 editorViewController 出现了,但没有导航栏。
有什么办法解决这个问题吗?
最佳答案
我使用以下代码解决了这个问题:
let editorViewController = IMGLYMainEditorViewController()
let navEditorViewController: UINavigationController = UINavigationController(rootViewController: editorViewController)
self.presentViewController(navEditorViewController, animated: true, completion: nil)
我刚刚添加了 navEditorViewController
,因为它使我的导航栏及其项目出现。
关于ios - Swift - 显示另一个带有导航栏的 View Controller ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36156188/