Nov 15, 2012

Change the Back button Title in iOS UINavigation

Posted Nov 15, 2012

I thought it was straightforward to alter the title of the back bar button item. Turns out you need to define the entire back bar button item in the calling screen.

In the calling controller (meaning, the parent controller where you will push the new controller), add this in viewdidload:


self.navigationItem.backBarButtonItem =  [[[UIBarButtonItem alloc] initWithTitle:@"Custom Back Title"
                                    style:UIBarButtonItemStyleBordered
                                   target:nil
                                   action:nil] autorelease];


My mistake was I keep changing the backBarButtonItem of the new controller! Sheesh, Apple.

No comments:

Post a Comment