Last active
December 15, 2015 18:30
-
-
Save ChrisRisner/5304762 to your computer and use it in GitHub Desktop.
Popping view controllers and removing modals
This file contains hidden or 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
- (void) popTest { | |
UINavigationController *nav = (UINavigationController*) self.view.window.rootViewController; | |
UIViewController *root = [nav.viewControllers objectAtIndex:0]; | |
[root performSelector:@selector(returnToRoot)]; | |
} |
This file contains hidden or 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
-(IBAction)reset:(UIStoryboardSegue *)segue { | |
//do stuff | |
} |
This file contains hidden or 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
- (void)returnToRoot { | |
[self dismissViewControllerAnimated:NO completion:nil]; | |
[self.navigationController popToRootViewControllerAnimated:YES]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment