How the Tab Bar Works

With UITabBarController, each functional area or tab is a root view. In effect, the tab bar controller is the real root view of the application, as you can see in Figure 7-10.

Image

Figure 7-10 Clock hierarchy

When the user taps an item in the tab bar, the root-level view for that item is shown, even if it is the currently selected tab bar item. For example, on your own device, open Music, select Playlists, select a playlist, and then tap the Playlists tab at the bottom. The app returns to the list of all playlists.

Figure 7-11 shows the parts of a tab bar controller. This tab bar, shown in white, has two items: the first with ...

Get Learning iOS Development: A Hands-on Guide to the Fundamentals of iOS Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.