0PricingLogin
SwiftUI Academy · Lesson

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

  1. Pushing Screens with NavigationLink
  2. Passing Data to Detail Views
  3. Toolbar & Navigation Title
  4. Programmatic Navigation Paths
← Back to SwiftUI Academy