Last active
August 29, 2015 14:09
-
-
Save spotlessicode/b0261a2da66ba2715317 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (UIStoryboardSegue *)segueForUnwindingToViewController:(UIViewController *)toViewController fromViewController:(UIViewController *)fromViewController identifier:(NSString *)identifier | |
{ | |
//how to set identifier for an unwind segue: | |
//1. in storyboard -> documento outline -> select your unwind segue | |
//2. then choose attribute inspector and insert the identifier name | |
if ([@"UnwindFromSecondView" isEqualToString:identifier]) { | |
return [[MyCustomUnwindSegue alloc] initWithIdentifier:identifier source:fromViewController destination:toViewController]; | |
}else { | |
//if you want to use simple unwind segue on the same or on other ViewController this code is very important to mix custom and not custom segue | |
return [super segueForUnwindingToViewController:toViewController fromViewController:fromViewController identifier:identifier]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment