Unwind segue doesn't dismiss adaptive popover presentation when not modal

前端 未结 4 1019

Update for iOS 9 beta: Apple may have fixed this for iOS 9. If you work(ed) around this issue for iOS 8, make sure it also works correctly on iOS 9.

In

4条回答
  •  猫巷女王i
    2021-02-06 12:25

    I ran into this problem too. I present a View Controller modally (as a form sheet), from the Master View Controller (UISplitViewController). The problem only occurred on the iPad (probably the iPhone 6+ in landscape mode too, but I didn't check it). I ended up doing the following in my unwind action method (using Swift), and it works good.

    if !segue.sourceViewController.isBeingDismissed() {
        segue.sourceViewController.dismissViewControllerAnimated(true, completion: nil)
    }
    

提交回复
热议问题