Hello. There's very little information regarding DoubleColumnNavigationViewStyle and the documentation just say "No overview avaiable".
When using code below. It loads the detail-view on the right side without a navigationbar-title and it's not selected in the master-view on the side. If I select the view from the master-view, then it shows correctly. Is there a workaround to fix this? My idea was to maybe force a selection somehow.
Issue: Loads view, tab not selected, no title.
https://i.imgur.com/cl9dNGV.png
Fixed when selecting tab:
https://i.imgur.com/NJ0VjQ1.png
Apple Settings-app selects tab by default, mine don't.
https://i.imgur.com/FcaNYav.png
Same issue happens on my real iPad Pro as well in the simulator.
Deployment target: 13.2
iPadOS: 13.3
//
// SettingsSwitcherView.swift
//
// Created by Philip Andersen on 2020-01-28.
// Copyright © 2020 Philip Andersen. All rights reserved.
//
import SwiftUI
struct SettingsSwitcherView: View {
var body: some View {
NavigationView {
List {
Section {
NavigationLink(destination: SettingsGeneralView()) {
Image(systemName: "gear")
.padding(7)
Text("General")
}
.padding(.vertical, 7)
}
Section(footer: Text("Version: \(BuildInfo.longVersionBuild())")) {
NavigationLink(destination: SettingsHelpView()) {
Image(systemName: "questionmark.circle")
.padding(7)
Text("Help")
}
.padding(.vertical, 7)
NavigationLink(destination: SettingsContactView()) {
Image(systemName: "envelope")
.padding(7)
Text("Contact us")
}
.padding(.vertical, 7)
NavigationLink(destination: SettingsAboutView()) {
Image(systemName: "info.circle")
.padding(7)
Text("About this app")
}
.padding(.vertical, 7)
}
}
.navigationBarTitle("Settings", displayMode: .large)
.listStyle(GroupedListStyle())
// Load default detail-view (loads, but not selected in master-view)
SettingsGeneralView()
}
.navigationViewStyle(DoubleColumnNavigationViewStyle())
}
}
Thanks.