SwiftUI NavigationView force "both panels side by side" split behaviour

Hi, is it possible to have the SwiftUI's NavigationView set to show both panels side by side in landscape mode on iPhone Plus/Max sized devices? Similar to how Messages.app does it. Thank you.

Replies

According to the following article:

https://serialcoder.dev/text-tutorials/swiftui/navigation-view-style-in-swiftui/

Use the columns navigation view style to have two panels side by side on iPhones with screens big enough to show two panels.

NavigationView {
    …
}
.navigationViewStyle(.columns)

No, that doesn't work: the side panel slides and partially obscures the main panel. For the record: the newer NavigationSplitView + navigationSplitViewStyle(.balanced) does work correctly on my plus sized device.