Last active
December 14, 2015 14:48
-
-
Save cwagdev/5103091 to your computer and use it in GitHub Desktop.
Detect UINavigation back button press
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)viewWillDisappear:(BOOL)animated { | |
if ([self.navigationController.viewControllers indexOfObject:self]==NSNotFound) { | |
// back button was pressed. We know this is true because self is no longer | |
// in the navigation stack. | |
} | |
[super viewWillDisappear:animated]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment