Introduction

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

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
Download course materials from Github
Previous: Quiz: Setting Up a Navigation Stack Next: Hierarchical Navigation Structures