swift - 使用 Segue 退出导航 Controller

标签 swift xcode uinavigationcontroller segue

情况如下:我有一个开始屏幕,我可以在其中放置一些用于导航 Controller 的数据。我通过 Segue 将 ViewController(开始屏幕)与导航 Controller 连接起来,效果非常好。但现在我正在寻找一种解决方案,以返回开始屏幕,而无需仍处于导航 Controller 界面中。 我很确定 StackOverflow 中已经有一个问题,但我找不到它。我将非常感谢你宁愿链接这个问题,或者如果它不在 Stackoverflow 中帮助我。

谢谢:)

最佳答案

听起来您为 NavigationController 提供了模态 Segue。 如果是这种情况,当您准备好返回启动 View Controller 时,可以调用解雇。

dismiss(animated: true, completion: nil)

关于swift - 使用 Segue 退出导航 Controller ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47840605/

相关文章:

ios - 在El Capitan上安装Xcode 6.4,同时安装Xcode 7

iphone - 如何重置 UINavigationController?

iOS( swift ): Core data fetching with relationships

ios - 如何使用 URLSeassion 显示下载进度

swift - 向 API 发出重复请求

iphone - 多开发团队 Xcode4 项目最佳实践

ios - 将更多项目添加到 ScrollView 顶部时,将现有项目向下移动

ios - Swift:异步回调

ios - 如何以正确的方式使用导航 Controller 实现标签栏 Controller

iphone - popViewController iphone