This package is part of the SNAP suite.
Matching Navigation provides a SwiftUI container view that displays a TabView or SplitScene, based on the device.
The demo project shows an example on how to use the package.
MNavContainer(splitScene: {
NavigationSplitView {
Text("Sidebar")
} content: {
Text("Content")
} detail: {
Text("Detail")
}
}, tabScene: {
MNavTabScene(tabs: tabs, selected: $tabSelected, tabScreen: { tab in
<View for the tab>
})
})
A container that either shows the SplitScene
or the TabScene
ViewBuilder based on device.
A wrapper around TabView to expose the selected tab as a binding.