The backBarButtonItem
that you see when your view controller is visible in the navigation controller interface is not the backBarButtonItem
of this view controller. It is the backBarButtonItem
of the second view controller, the one behind this one in the stack.
So what you want is this:
UIInteger c = [self.navigationController.viewControllers count];
UIViewController* vc2 = [self.navigationController.viewControllers objectAtIndex:c-2];
Now get the backBarButtonItem
of the navigationItem
of that view controller. Or just get its title
if they are the same.