Due to a weird request which I tried to turn down but it didn\'t work, I had to override the navigationBar\'s back Button.
I have made a custom UINavigationControlle
You probably need to do [super shouldPop...
instead of actual [self popViewControllerAnimated:YES];
.
The reason being that the way UINavigationController
implements stack is private, so you should mess with the method calls as little as possible.
Anyway, this looks like a hack. Moreover, the user will have no visual clue that you are blocking the navigation action. What's wrong with disabling the button via:
self.navigationController.navigationItem.backBarButtonItem.enabled = NO;