Detect back button touch on UINavigationController

/ Published in: iPhone
Save to your folder(s)

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

Copy this code and paste it in your HTML
  1. -(void) viewWillDisappear:(BOOL)animated {
  2. if ([self.navigationController.viewControllers indexOfObject:self]==NSNotFound) {
  3. // back button was pressed. We know this is true because self is no longer
  4. // in the navigation stack.
  5. }
  6. [super viewWillDisappear:animated];
  7. }


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.