The following NavigationView
contains a primary master and secondary detail view:
struct ContentView: View {
var body: some View {
NavigationView {
Text("Primary View")
.navigationTitle("Primary")
Text("Secondary View")
.navigationTitle("Secondary")
}
}
}
When used with an iPad in any orientation everything works as expected. The primary view is shown in the sidebar and the secondary view is shown in the main content area:
When used on an iPhone the primary view is displayed and there seems to be no way to access the secondary view:
What is the correct way to set up a master/detail NavigationView
on the iPhone?