我正在使用带有情节提要的 iOS 5。我有一个根Navigation Controller
并附Tab Bar Controller
有两个Tab Bar
项目。我正在尝试手动或以编程方式Tab Bar
在顶部导航栏上的一项中设置标题。
以下是我尝试过的一些有趣的东西,ViewDidLoad
但标题仍然没有出现。
self.navigationController.navigationItem.title = @"Item List";
self.navigationItem.title = @"Item List";
self.tabBarItem.title = @"Item List";
[self.tabBarItem setTitle: @"Item List"];
[self.navigationItem setTitle:@"Item List"];
[[self.parentViewController.tabBarController.tabBar.items objectAtIndex:0] setTitle: @"Item List"];
你如何在 iOS 5 中设置标题?