ios - 从标签栏 Controller 返回查看 Controller

标签 ios swift

enter image description here我有一个 View Controller 。这个 View Controller 转到一个有两个 child 的 TabBarViewController。我怎样才能从这个 child 回到 Root View Controller ? (我想在点击更新/更改按钮后返回到第一个 View Controller )

我已经试过了,但没用。

self.navigationController?.popToRootViewController(animated: true)

最佳答案

你可以试试

self.navigationController?.navigationController?.popToRootViewController(animated: true)

关于ios - 从标签栏 Controller 返回查看 Controller ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49854933/

相关文章:

ios - 如何从另一个 View Controller 移动到现有 View Controller

ios - 只需单击启动图标,应用程序就会卡住我的整个手机

IOS Safari URL UTI 分享表

swift - 需要在一系列的 getDocument 价格查找之后获取购物车总和

java - 查询 Firebase 的位置范围

ios - 如何在 Swift 中从 Detail ViewController 更新 tableview 数组

iphone - 如何在应用程序中间重新初始化我无法完全控制的单例?

ios - 获取错误 "File ... couldn’ t be opened because there is no such file"for existing file

iOS Swift UIViewController 旋转

ios - 约束更改时的自动布局 UIView 不会为 iOS 7 设置动画