在Swift 3和iOS 10中,展开segue不起作用
我试图在iOS 10和Swift 3中testingunwind segue。
我做了这样一个简单的应用程序:
我在TableViewController
类中添加了segue的代码,并连接“取消”button,并在表视图控制器场景上退出:
@IBAction func unwindToRootViewController(segue: UIStoryboardSegue) { print("Unwind to Root View Controller") }
但我简单的赛格不起作用。 我究竟做错了什么?
在上面的评论中可以看出问题是这样的:
我在TableViewController类中添加了segue的代码
展开segue必须在您的“外部” ViewController
,而不是TableViewController
。
这篇文章给出了一个非常好的介绍unwind segues。