首页 > 解决方案 > 无法使用 unwind segue 展开到 UITableviewController

问题描述

我有一个UINavigationController具有以下层次结构:

tableViewController -> detailView1 -> detailView2。

detailView2我试图回到tableViewController使用展开序列。但什么也没有发生。

在 TableViewController 中有 unwind 方法

@IBAction func unwindTest( _ seg: UIStoryboardSegue) {
}

detailView2 有一个按钮。这会触发 unwind segue。这完成了从按钮拖动到此 ViewController 中的出口

注意:当我尝试用UITableviewControllerunwind UIViewControllersegue 替换时。

标签: iosswiftuitableviewswift5unwind-segue

解决方案


未设置 UITableviewController 的自定义类。一旦设置了 unwind segue 就可以正常工作。


推荐阅读