ios - dismissViewControllerAnimated 将所有 View Controller 关闭到 root [swift]

标签 ios swift uiviewcontroller

假设我有 4 个 View Controller

第 1 页 ----showdetail----> 第 2 页 ----> 第 3 页 ----showdetail----> 第4页

我想使用 self.dismissViewControllerAnimated(true, completion: nil) 从第 4 页返回到第 3 页。它在 iOS 9 中运行良好,但当我在 iOS 8 设备中尝试时,它会将所有 View Controller 关闭到第 1 页

最佳答案

您可能想使用Present Modally 转场而不是Show Detail。这里对每种segues都有很好的解释What's the difference between all the Selection Segues?

关于ios - dismissViewControllerAnimated 将所有 View Controller 关闭到 root [swift],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35794956/

相关文章:

database - Swift - 在 View 之间花费大量数据 : create objects in the first view or connectar several times in the database?

swift - 如何设置具有多个 TableView 和每个 TableView 不同的 TableViewCell 的 View ?

ios - Swift:从我介绍的 Storyboard View Controller 调用函数?

ios - 通过在另一个 ViewController 中按下按钮/在另一个 ViewController 中引用 UITableView 创建 UITableViewCell

ios - UIView 在运行时不会改变

ios - 根据 UITextView 的 contentSize 调整特定表格 View 单元格的大小

iphone - iOS 7 - XCode 5 - 约束

ios - 使用字符定界符在 Swift 中查找和突出显示文本

swift - UIView 和 UIViewController 之间的委托(delegate)/协议(protocol)不起作用

ios - 在 App 中更改 iPhone 相机快门声音