0

I have more than 5 tabs, so the "more" button appears and works fine. However, when I open up one of the tabs from the more menu, there is an extra navigation bar at the top, which shrinks the available space in my app.

I want to move or re-implement the "more" button (at the top of the page) into my existing navigation bar for each tab. How do I do this?

Here is an image of what i have now, and what I want is to move that "More" button into the space where it says "Here instead", so that I can hide the upper black bar. If it matters, I am using the storyboards.

enter image description here

Orchid
  • 271
  • 6
  • 20

1 Answers1

2

You will need to hide the navigation bar, and then create your own button on your tool bar that will pop to the root navigation controller.

To hide the nav bar:

[myTabBarController.moreNavigationController setNavigationBarHidden:YES animated:NO];

It looks like in order to recreate the left arrow from the navigation bar in your tool bar, you will actually have to use an image and set that as the view of your toolbar item. There is an image you can use here.

Community
  • 1
  • 1
Dima
  • 23,484
  • 6
  • 56
  • 83
  • Thanks for the code, but I already knew how to do that from reading other SO questions. This question is supposed to be asking how do you actually implement the "more" button in my own navigation bar? How do transition to the More table when I don't even have access to its view controller? – Orchid Jul 10 '12 at 20:35
  • Why can't you access it? If you create a function with the following code in it, and set it as the selector for your UIToolBarItem, you should get what you want. `[myTabBarController.moreNavigationController popToRootViewControllerAnimated:YES];` – Dima Jul 10 '12 at 20:39