In the first two lessons of this module, you focused on hierarchical navigation. Hierarchical navigation gives users fewer initial options at the top of each view stack with a deeper structure underneath.
In the sample project, you began with a navigation structure. Tapping each option takes the user to that section with the appropriate information, such as a list of flights. Tapping a flight shows the user more information about that single flight. In a shopping app, you can start by showing the user categories, then display the products within a category, and then the details for each product.
You’ll find yourself adapting many apps to hierarchical navigation. This pattern is widespread because it works well for data that starts at a high level or general state and focuses with more detail on fewer items at each level.
Despite how often you’ll use it, hierarchical navigation has a few drawbacks. Due to the depth of each view stack, the user may have to backtrack through several layers of the navigation stack to find another view. It also makes it challenging to switch laterally between view stacks.
The other typical navigation structure uses a flat hierarchy. A flat navigational structure is best for moving between views that divide content into clear categories. The top-level view layout is broad and divided into multiple top-level views. Each view has less depth below the top view. This kind of navigational structure makes it easier for users to discover information because the path between the starting view and any view in the app is as short as possible.
But take care: too many categories, or indiscernible categories, can overwhelm the user. Simplify your app navigation by using a minimal number of tabs with concise titles or icons, aiming for up to five tabs in iOS. Check Apple’s guidelines for other tab bar best practices.
In SwiftUI, you use a TabView to implement a flat hierarchy. In this lesson, you’ll learn about TabViews and how to implement them in an app, as well as how to customize the tabs and show more information on each tab.
See forum comments
This content was released on Jun 20 2024. The official support period is 6-months
from this date.
Download course materials from Github
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress,
bookmark, personalise your learner profile and more!
Previous: Quiz: Hierarchical Navigation Structures
Next: TabView in SwiftUI
All videos. All books.
One low price.
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.