When I push a new ViewController onto a navigation controller stack the "back" button is the Title of the previous controller.
How can I change the text in the back button to "Back" instead of the default name-of-last-controller?
This is the proper way to make a back button with something other than the previous' pages title
UIBarButtonItem *barButton = [[UIBarButtonItem alloc] init];
barButton.title = @"Your Title";
self.navigationItem.backBarButtonItem = barButton;
Its to my understanding that:
self.navigationItem.backBarButtonItem.title = @"Your Title";
will make the Title of the navigation bar on the previous page this which is not what you want.
I know, the question is very old, but I found a nice solution.
UIBarButtonItem *barButton = [[UIBarButtonItem alloc] init];
barButton.title = @"back";
self.navigationController.navigationBar.topItem.backBarButtonItem = barButton;
Works from childView! Tested with iOS 7.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With