我遇到类似这样的问题:

Cannot Get Unwind Segue Working with Modal View Controller Presented Over Current Context

我在教程后使用OverCurrentContext演示样式以模态方式呈现了VC . 全部设置在故事板中 .

VC1 - > modally overCurrentContext - > VC2

问题是Xcode 8在Attributes Inspector中有不同的选项,Segue中没有OverCurrentContext选项,所以我不得不选择演示文稿:Segue中的默认值

enter image description here

并在VC2中设置表示:overCurrentContext

enter image description here

现在,当我试图放松回VC1时,我不能,没有任何反应,我被困在VC2中 .

我不得不在unwind方法中添加一些额外的代码来使其工作 .

@IBAction func unwindFromAdvancedOptions(segue: UIStoryboardSegue) {

    if segue.source as? VC2 != nil {
        segue.source.dismiss(animated: true, completion: nil)
    }
}

但我真的很想理解为什么故事板设置足以放松任何其他模态演示样式但OverCurrentContext .