Reputation: 47354
I have an interface laid out in storyboard, and one of my controllers gets pushed into the ... More... section of the tab bar controller. I cannot seem to find a way to set it's navigation item's title. It is set up in the storyboard, but does not appear.
Here's the structure Tabbar > relationship to Navigation controller> relationship to view controller
self.navigationItem.title = @"DOES NOT WORK";
UINavigationBar *moreNavigationBar = self.tabBarController.moreNavigationController. navigationBar;
moreNavigationBar.topItem.title = @"SETS THE BACK BUTTON TITLE";
What do I need to do to set text in the empty space on the attached screenshot?
Upvotes: 0
Views: 182
Reputation: 23278
If you want to do this programmatically you can just add the following in your viewDidLoad
of viewController
as,
self.title = @"title goes here";
Upvotes: 0
Reputation: 7327
Unless you have custom code inside the tab bar that hides the title, you just have to change the title
property of the view controller being displayed. That can easily be done inside the storyboard editor.
Upvotes: 1