Return to Snippet

Revision: 37240
at December 7, 2010 01:12 by yannxou


Initial Code
-(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];
}

Initial URL
http://www.comanswer.com/question/setting-action-for-back-button-in-navigation-controller

Initial Description
Code taken from comment by 'William Jockusch' in the URL.

Initial Title
Detect back button touch on UINavigationController

Initial Tags
iphone

Initial Language
iPhone