开发者

How to change the text of navigationItem.leftBarButtonItem for iPhone

开发者 https://www.devze.com 2023-01-17 01:30 出处:网络
How do I change the text value navigationItem.leftBarButtonItem? In view A I did self.title=@\"hi\" 开发者_JS百科So when I go to B my back button has the text @\"hi\". now I want to change it to bac

How do I change the text value navigationItem.leftBarButtonItem?

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

开发者_JS百科

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?


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

0

精彩评论

暂无评论...
验证码 换一张
取 消