0

This is a bit of a tricky one to explain here so I'm hoping the screenshot of the storyboard of the app I'm trying to build helps to clarify what I'm trying to do.

Basically the apps starts with a nav controller and table view, when you click on a cell in the table view you go to a tab bar controller with three tabs, each tab view has its own navigation controller and subsequently there is a navigation bar on each of them, so at this point there is a back button on all tab views which takes us back to the initial table view.

The first tab view simply has some text, the next has a table view with several table cells and the last has a map view with several markers. Both the table cell and the map markers link to a detail view via a navigation controller which shows more detailed information (both via named segues). It's at this point of clicking through to the detail view where the navigation is breaking, the detail page shows no navigation bar although it is there as the title text is set, but there is no back button and it seems that the navigation context / hierarchy has been broken here somehow. The appearance of the storyboard also reflects this as it shows no Back button on the navbar on the navigation controller or the Detail view.

Without initially getting into the code in any real way I am just trying to see if there is any significant reason why these type of structure / hierarchy is just now going to work. So, my main question is does this storyboard structure seem like the correct way to go about what I'm trying to do?

Here is the storyboard:

Storyboard for the app

Rick Curran
  • 121
  • 4
  • 1
    I think is because you are pushing a new instance of UINavigationController, which, seeing the picture above, it makes no sense for me since your view controllers are already managed by a previous UINavigationController. Try removing that last navigation controller. – glm4 Dec 01 '17 at 18:52
  • Thanks @glm4, I thought I had tried that as an option before but I went and changed it to that. It did work but the only issue was that it stayed within the context of the tab bar controller so the tabs were still at the bottom, additionally the Back button appearance and functionality didn't change. However, I've decided to use a slightly different method and implemented it using a navigation controller but with "Present Modally" so that it shows as a modal overlay with a close button, this actually works really well and something I had been considering as the most appropriate interaction. – Rick Curran Dec 04 '17 at 12:07
  • 1
    Great! For the tab bar you could use hidesBottomBarWhenPushed property. The modal presentation is an option too :) – glm4 Dec 04 '17 at 13:22
  • Thanks for the tip about the hidesBottomBarWhenPushed property, that might come in handy! – Rick Curran Dec 04 '17 at 17:30

0 Answers0