SwiftUI navigation is organized around two styles: flat and hierarchical. Hierarchical navigation gives the user fewer options at the top than a flat layout. Each option/view contains more views beneath, with a deeper structure.
In SwiftUI, you implement hierarchical navigation using a NavigationStack. Views may also contain multiple layers below the initial view. The user may also have to backtrack through several layers of the navigation stack to find another view. Hierarchical navigation works well when the user has little need to switch laterally between view stacks and when view stacks move from broader to more specific information at each level.
Beyond the simple stack you explored in lesson one, you can split your hierarchical navigation into multiple columns. A multi-column view will look similar on smaller screen devices but let you take advantage of the larger screens of iPad and macOS devices.
In this lesson, you’ll employ NavigationSplitView to change the app in lesson one to use multi-columns. You’ll learn to integrate the NavigationStack from lesson one with the multiple-column views. You’ll also explore the creation of two-column and three-column views and learn some design considerations with each.
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: Setting Up a Navigation Stack
Next: Hierarchical Navigation Structures
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.