snap-matching-navigation

0.1.0

A SwiftUI Container that displays a TabView or SplitScene, based on the device.
simonnickel/snap-matching-navigation

What's New

Initial Release

2024-04-19T14:24:29Z

Initial Release

This package is part of the SNAP suite.

SnapMatchingNavigation

Matching Navigation provides a SwiftUI container view that displays a TabView or SplitScene, based on the device.

Documentation

Demo

The demo project shows an example on how to use the package.

How to use

MNavContainer(splitScene: {
	NavigationSplitView {
		Text("Sidebar")
	} content: {
		Text("Content")
	} detail: {
		Text("Detail")
	}
}, tabScene: {
	MNavTabScene(tabs: tabs, selected: $tabSelected, tabScreen: { tab in
		
		<View for the tab>
		
	})
})

MNavContainer

A container that either shows the SplitScene or the TabScene ViewBuilder based on device.

MNavTabScene

A wrapper around TabView to expose the selected tab as a binding.

Description

  • Swift Tools 5.10.0
View More Packages from this Author

Dependencies

  • None
Last updated: Sat May 04 2024 18:49:14 GMT-0900 (Hawaii-Aleutian Daylight Time)