Thanks for asking about this, since I've just encountered the same issue. I assume that it's a bug, but I have not yet filed it with Apple. In the meantime, the easy workaround is to call dismissViewController:animated:
in your unwind:
implementation (that is, in the action method connected to the unwind segue through the Exit icon), thus dimissing the modal view yourself.
My only worry about this solution is that if this is a bug and Apple eventually fixes it, will their fix break any code using this workaround? Only time will tell...
Later Edit: I have discovered a much nicer workaround. Subclass the parent (container) class of the class you want to unwind to, and implement unwind there instead. For example, in my app, the situation looks like this:
UISplitViewController
UINavigationController
MasterViewController
UINavigationController
DetailViewController ----> modal segue ----> ThirdViewController
The exit / unwind segue from ThirdViewController back to DetailViewController demonstrates the bug - the unwind:
implementation is called, but the form view is not dismissed. But if I subclass UISplitViewController and implement unwind:
there, it works fine. (The unwind:
implementation can be empty; the point is that the form view is dismissed automatically.) So evidently this is an issue having to do with container view controllers, and you can solve it by letting the container handle it.
See my example project, uploaded to https://github.com/mattneub/Programming-iOS-Book-Examples/tree/master/ch19p561containerViewControllerStoryboard3Bug