问题
I'm stuck with unwind segue that doesn't work for some reason, I do everything as described in tutorial: cntrl drag to exit and select unwind action from another controller (please see gif attached). When I run it on my iphone and tap Cancel, nothing happens.
回答1:
It looks like the view controller you're trying to unwind from is already the bottom of the UINavigationController
's stack, so it's not going to do anything when the unwind is called.
If that UINavigationController
is being called modally, call
self.navigationController?.dismiss(animated: true, completion: nil)
within the view controller where the button is being pressed.
来源:https://stackoverflow.com/questions/43954996/swift-unwind-segue-doesnt-work