Using Xboard Storyboard to create Master-Detail views where the Detail view is a tab bar for three different views


I'm trying to implementing master-detail scenes where the detail scene can be tabbed to show three different scenes. The example is a list of stories and for each story, I am interested to present an introduction, author info and reviews. So the scenes are as the following:

  1. Master scene: a list of stories

When a story is selected:

  1. Detail - Introduction scene (about the selected story)
  2. Detail - Author scene (about the author)
  3. Detail - Reviews scene (a list of reviews)

I attached the storyboard that I used to kind of achieve this:

I also attached the resultant scene on the iPhone simulator that showed the Detail - Author scene:

My problem is with there are 2 navigation bars presented in the detail - author scene: The top one with Stories back button, and the bottom one with Author label and B button. I want them to be collapsed into just one navigation bar. This means that when I click on a story from the Stories scene to transition to the detail author view, there will be only one navigation bar that has the Stories back button, the Author label, and the B button.

My question is: How can I collapse these two navigation bars together? Any advice would be greatly appreciated.

The problem is that you have a root navigation controller and you also have a navigation controller in each tab of the tab controller, then you show them both at the same time.

You could try a couple of things:

  1. Hide the root nav controllers nav bar when the tab view is on display. This could be manual or by presenting modally. In either case you will need a done / back button to dismiss. The modal option could be done in the storyboard.

  2. Add a delegate to the tab bar controller. Remove the nav controllers from each tab. When the tab changes, get the new view controller and set its navigationItem onto the root nav controllers nav bar.

Back button items are only shown when there is something to go back to. You can add left button items. You may be able to connect them to an unwind segue or you might need to add a method to each view controller which does:

[self.tabBarController.navigationController popViewControllerAnimated:YES];