Just to expand on @OOPer's comment and spell it out for simple-folk such as myself who are fairly new to SwiftUI -
You don't need to "nest" a NavigationView. By that it means (including pseudo-code)
View A -> View B
View A
var body: some View {
NavigationView(
.. stuff here
.navigationBarTitle("Main menu")
)
}
View B
var body: some View {
Text("Stuff to show on the next page")
.navigationBarTitle("sub menu", displayMode: .inline)
}
Seems kind of obvious when you think about it, coming from UIKit, you wouldn't be able to push a UINavigationController into the navigation stack.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: