ios - 执行 segue 导航 Controller ,但导航栏不出现

标签 ios swift

我正在转到与 UINavigationController 链接的 View ,但是 UINavigationBar 没有出现。没有任何 UINavigationController 的迹象。

我的 StoryBoard 看起来像这样:

UIStoryBoard screenshot

为了执行 segue,我使用了这个:

 self?.performSegue(withIdentifier: "practicemod", sender: self)

准备函数如下所示:

override func prepare(for segue: UIStoryboardSegue, sender: Any?) {

        var vc = segue.destination as! PracticesView
        vc.practices = sdkPractices
        vc.consumer = sdkConsumer

    }

有人可以帮我吗?我错过了什么?

最佳答案

Storyboard中的起点需要是导航 Controller 。

从选择 View 到导航 Controller 到 TableView Controller (PracticesView)。

这应该可以解决您的问题

关于ios - 执行 segue 导航 Controller ,但导航栏不出现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52351967/

相关文章:

swift - 简单的 Swift 类不编译

ios - 如何快速更改搜索栏的高度

ios - 在混合 Swift Objective-C 环境中调用 NSURLConnection 时无响应

ios - performSelector 未在 iPhone 5 和 7 Plus 中调用

iOS 动画 >> 如何为单个对象设置动画以移动多个位置

json - 如何使用 Realm Swift 和 ObjectMapper 持久化数组?

swift - 如何在 Swift 中为 UICollectionViewCell 制作动画?

iphone - 更改 UIActionSheet 标题字符串的字体类型和大小

ios - 如何为 iPhone 构建 Boost-Libraries

ios - IBM Domino 服务器上的 Swift 3 URLSession 身份验证