I have an app that has a few setup screens that need to be walked through, including selecting a data set. Once the user’s selected a data set, they get a screen with a tab bar.
I had to set this up as follows:
UINavigationControlleras main root.- A
UITabBarControllerthat’s pushed intoUINavigationControllerwhen a data set is opened. (The navigation bar is hidden at this point.) - Each tab is its own
UINavigationController.
This works reasonably well, except that there’s an obvious break when the user opens the data set. I can’t provide a back button that looks like the OS’s to return to select a different data set. This means users need to close the app to switch data sets (which is not horrible, since for security reasons we don’t support multitasking).
How can I make it easier to for users to select a different data set?
Apple warns you not to use UITabBarController as part of a UINavigationController’s stack in the UITabBarController class reference:
Instead make the tab bar controller your root view controller and present your “data set selection” navigation controller as a modal view controller over the tab bar controller. Add a toolbar or other interface to select a new data source.
Alternately show only the tab bar controller, present some reasonable contents for each tab when no data source is selected, and use one of the tabs (or an option under the “more” tab) to control data source selection.