开发者

How to change the text of navigationItem.leftBarButtonItem for iPhone

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜