我在 Swift 中有一个导航栏设置,它可以正确切换到其他导航 View Controller ,但是当我点击设置为模式返回当前 View Controller 的按钮以刷新内容时,导航栏消失了!这是如何解决的?
最佳答案
你说
...but when I hit a button that is set to modal back to current view controller...
这没有道理。模态框是一个新的 View Controller ,它显示在当前 View Controller 的顶部,完全遮盖它。你不会“模态返回”任何东西。如果您想返回到导航堆栈中的上一个 View Controller ,您可能需要使用 popToViewController:animated: 方法,或者如果您要通过以下方式返回到上一个 View Controller ,请使用展开转场继续。
关于swift - UINavigationBar 在模态上消失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30059733/