In a basic NavigationStack you get the nice < Title
button in the upper left, to take you back to the previous view, and it is automatically named with the .navigationTitle()
of that previous view.
You can also have your own toolbar, with say an Info button on the right side like this
.toolbar {
NavigationLink("?") {
Text("Destination")
}
}
But that ONLY gives you the ? button. Is there built in way to get the native back navigation without needing to manage everything yourself? Getting the title of the previous view seems like it would be a pain. And I am assuming there must be something like BackLink()
that does it all for you, to get something like this as the Tool Bar.
< Title ?