I'm aware it's possible to manipulate sidebar width for a NavigationSplitView like this.-
NavigationSplitView {
Text("Sidebar")
.navigationSplitViewColumnWidth(min: 100, ideal: 200, max: 300)
} content: {
Text("Content")
.navigationSplitViewColumnWidth(min: 100, ideal: 200, max: 300)
} detail: {
Text("Detail")
}
But my main view includes a simple NavigationView (just a side bar and content), and it seems there's no api for specifying width in this case. Any known way to get the same effect in this scenario?
NavigationViewwas deprecated a few OSs ago and should not be used invisionOSbecause it is known to have many bugs a limitations.If you want to duplicate the 2 column setup you should migrate your code.
From
To
Then you can use
https://developer.apple.com/documentation/swiftui/migrating-to-new-navigation-types