🔸navigation bar
SwiftUI ⟩ navigation ⟩ bar
A navigation var shows the title of the current view as well as displays various toolbar items within a NavigationStack.
NavigationStack { 
    // ⭐️ assign title to a view (within NavigationStack)
    MyView().navigationTitle("My View")
}Last updated
Was this helpful?