当我按下导航 Controller 第一个 View 中的按钮时,我需要返回主视图......
我已经连接了一个简单的 View ,并且该 View 转到导航 Controller ..
ViewController --> 导航 Controller --> 导航 View
<----------------------------------------------
我怎样才能做到这一点......
最佳答案
你想返回到顶层Root ViewController:
navigationController?.popTopRootViewControllerAnimated(true)
如果你想返回到之前的viewController:
navigationController?.popViewControllerAnimated(true)
关于ios - 导航 Controller 和 View Controller ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32359485/