0
votes

I have an app with a tabview as the initial view controller. Segues hook up the tabview buttons to the other view controllers, and everything is fine except for the master/detail view. Master/detail are two different views. None of this is in code, it is all in the storyboard.

When I go into the master view, and then use the tab bar controller to go to other views everything works great. When I go into the detail view and use the tab bar for navigation, everything works fine as well until I try to go to the master view. When I try to go back to the master view using the tab bar, I am directed to the detail view. I would always like to start with the master and then proceed to the detail.

To state this a little differently, when I use the tab bar to leave the master view and them come back to the master it works fine. When I leave the detail view and then use the tab bar to return to the master, I am directed to the detail view. Its like I am going to go back to the master view or the detail view depending on the one that was active last.

It this supposed to work this way or do I have something screwed up? I would like for the tab bar button that goes to the master view to always go to the master view.

The segues are all pushes, nothing modal.

Thanks much;

OldSchool

1

1 Answers

0
votes

What you want to do is to pop the details view controller off the navigation stack before switching tabs. A somewhat similar problem (and solution) has been discussed here:

popToRootViewController with animation and then switch tab