Created
December 21, 2012 04:57
-
-
Save mactive/4350702 to your computer and use it in GitHub Desktop.
UINavigationController 默认返回按钮时候 做一些操作
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. | |
[self setEditMode]; | |
} | |
[super viewWillDisappear:animated]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment