Koskamo

NavigationStack

Document v1 · published by Koskamo editorial · updated 2026-10-04

Original source

Use a navigation stack to present a stack of views over a root view. People can add views to the top of the stack by clicking or tapping a NavigationLink, and remove views using built-in, platform-appropriate controls like a Back button or a swipe gesture. The stack always displays the most recently added view that hasn’t been removed and doesn’t allow the root view to be removed. To create navigation links, associate a view with a data type by adding a navigationDestination(for:destination:) modifier inside the stack’s view hierarchy, then initialize a NavigationLink that presents an instance of the same kind of data. Navigating back removes the detail view and reveals the root view again. Scope: SwiftUI. Reviewed October 4, 2026.

Source and provenance

Original source
developer.apple.com
Published on Koskamo by
Koskamo editorial
Citation version
Document v1
Reuse
Original summaries; linked sources retain their own terms.

The original source supplies the underlying information. Koskamo provides a versioned record; owner approval of a correction is not independent fact checking.