tags:

views:

41

answers:

1

How do I change the text value navigationItem.leftBarButtonItem?

In view A I did self.title=@"hi"

So when I go to B my back button has the text @"hi". now I want to change it to back

How do I do that?

A: 
UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@"blah blah blah" style:UIBarButtonItemStylePlain target:nil action:nil];
self.navigationItem.backBarButtonItem = backButton;
[backButton release];

you can use this in view A and enter any text you want

alecnash
awesome thanks a lot i was trying same thing but in View B . never thought of A :( you saved me :-)
prajakta