Trying to run code when returning from a segment

I am trying to find a method to catch the return from segue to the root controller so that I can run my own code that will decide where to go next. I tried the two methods below, and they do not do the trick, as they (obviously) should be busy spinning the segue stack. Any thoughts out there?

-(UIStoryboardSegue *)segueForUnwindingToViewController
{
}

-(BOOL)canPerformUnwindSegueAction
{
}
+5
source share
2 answers

IOS 6 only:

"In the controller you want to return to, implement a method that returns an IBAction and that takes a single argument of UIStoryboardSegue:

- (IBAction)returnActionForSegue:(UIStoryboardSegue *)returnSegue {

// do useful actions here.

}

, , , , ( ). .

: http://www.freelancemadscience.com/fmslabs_blog/2012/9/24/advanced-storyboard-techniques.html

+5

. , :

+2

All Articles