开发者

Changing the title of a UITabBarItem without changing the view controller's title

I wish to have it so the view controller's title is different to the tab bar item's title.

I have tried the following, inside viewDidLoad

[self 开发者_如何学运维setTitle:@"My title"];
[[self tabBarItem] setTitle:@"Search"];

But the call to the second function doesn't seem to work


I use this to set my title and make it different from my tabBarItem:

self.navigationController.navigationBar.topItem.title = @"My Title";
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜