How do I change the title of the "back" button on a Navigation Bar

Posted by Dale on Stack Overflow See other posts from Stack Overflow or by Dale
Published on 2009-09-19T19:41:40Z Indexed on 2010/04/03 19:23 UTC
Read the original article Hit count: 294

Currently the left bar button default value is the title of the view that loaded the current one, in other words the view to be shown when the button is pressed (back button).

I want to change the text shown on the button to something else.

I tried putting the following line of code in the view controller's viewDidLoad method but it doesn't seem to work.

self.navigationItem.leftBarButtonItem.title = @"Log Out";

What should I do?

Thanks.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c