I have created a custom segue that presents a view controller inside a container that is very similar with Apple\'s own modal view controllers (I\'ve implemented it as a UIV
iOS development Library
There is a discussion on iOS development Library along with this method.
- segueForUnwindingToViewController:fromViewController:identifier:
Make sure your MyModalViewController is the container role rather than a subcontroller of a container. If there is something like [anotherVC addChildViewController:myModalViewController];
,you should put the segueForUnwindingToViewController method in some kind of "AnotherVC.m" file.
Discussion If you implement a custom container view controller that also uses segue unwinding, you must override this method. Your method implementation should instantiate and return a custom segue object that performs whatever animation and other steps that are necessary to unwind the view controllers.