Navigation for Swift and SwiftUIs
Navigation in SwiftUI covers moving between screens and presenting temporary content. NavigationStack with NavigationLink and a path pushes screens, while sheets, alerts and confirmation dialogs present modally. Animations and gestures, such as withAnimation, transitions and DragGesture, make these changes feel responsive to the user.
Stage: SwiftUI · Part of the Swift and SwiftUI roadmap · Last reviewed 19 November 2026
What to learn in Navigation
- Push and pop screens with NavigationStack and navigationDestination
- Drive navigation from a path array to support deep links
- Present a sheet and dismiss it using the environment
- Show an alert or confirmation dialog bound to state
- Animate a state change with withAnimation and matched transitions
- Add a drag or tap gesture and respond to its value
Navigation interview questions
How does NavigationStack differ from the older NavigationView?
NavigationStack is driven by data. You bind a path of values and register destinations by type, so you can push, pop or restore several screens programmatically. NavigationView was deprecated because it lacked this reliable programmatic control.
How do implicit and explicit animations differ in SwiftUI?
An implicit animation uses the animation modifier and animates changes to a specific value on that view. An explicit animation wraps a state change in withAnimation, so every view affected by that change animates together.
Where Navigation fits in the Swift and SwiftUI roadmap
Navigation belongs to the SwiftUI stage (intermediate level), which takes about 28 hours. Declarative UI.
Other units in this stage
Back to the full Swift and SwiftUI roadmap