Pushing Screens with NavigationLink
Navigate to a detail view on tap.
Screens That Stack
Real apps move between screens. In SwiftUI you wrap your content in a NavigationStack so you can push new screens on top and slide back. 📱
NavigationStack {
HomeView()
}What NavigationLink Does
A NavigationLink is a tappable label that pushes a new view onto the stack. Tap it and the next screen slides in from the right.
NavigationLink("Details") {
DetailView()
}All lessons in this course
- Pushing Screens with NavigationLink
- Passing Data to Detail Views
- Toolbar & Navigation Title
- Programmatic Navigation Paths