EDIT :
Add UINavigationControllerDelegate in .h file
Also do this:
[self.yournavController setDelegate:self];
Method below is navigation controller delegate
which is called when the navigation controller shows
a new top view controller
via a push
, pop
or setting
of the view controller stack
.
Add this method
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
{
}