Hey there,
I also stumbled upon this question today and SGB's solution works if you only use a NavigationView. I was using a TabView and nested the NavigationView into the tab and then the already provided solution doesn't work anymore.
After some trail and error I found a pretty simple solution which works for iOS 14:
swift
extension UISplitViewController {
open override func viewDidLoad() {
preferredDisplayMode = .oneBesideSecondary
}
}
You simply need to override the viewDidLoad from UISplitViewController and provide a preferredDisplayMode. With that you can change how many navigation levels are open.
Best,
Carsten