Toolbar & Navigation Title
Add titles and toolbar buttons to bars.
Naming the Screen
Every screen deserves a clear name. The navigationTitle modifier puts a heading in the navigation bar so users always know where they are. 🧭
.navigationTitle("Inbox")Where the Title Goes
Attach navigationTitle to the content inside the NavigationStack, not to the stack itself. The bar then reads the title from the current screen.
NavigationStack {
List { }
.navigationTitle("Inbox")
}All lessons in this course
- Pushing Screens with NavigationLink
- Passing Data to Detail Views
- Toolbar & Navigation Title
- Programmatic Navigation Paths