When I use this: [self.navigationItem setHidesBackButton:YES animated:NO];
to hide the back button in my navigationBar, my title doesn't get centered. It prints like the button is still there.
does anyone know why this happens, and how to fix it?
EDIT:
My program is like so: my rootViewController is a navigation controller, and I set that so the navigation bar is hidden. Then I push to another UIViewController, which I make the navigation bar appear again, but make the back button disappear.
I tried the setting self.navigationItem.backBarButtonItem = nil;
, but it didn't make the backbutton disappear.
Here's some pictures for reference:
viewController.navigationItem.hidesBackButton = YES;
This works perfectly!