TabView Swift Package
This packages’s purpose is to add tabbed functionality to all SwiftUI applications.
Below is an image of the functionality.
Below is a snapshot of an example implementation of the tabs.
The tabs interface is shown below
Required Vars
-
The tabs var takes in an array of strings, this is used to display each tab
-
The selectedTabIndex var is a @Binding var, changing dependent on the tab that is selected. This is also used within the example to display different views dependent on the selected tab.
Optional Vars
-
activeColor, inactiveColor change the the color of the selected/ not selected tab’s text. This is currently set to the device’s accent color if no value is passed through to the view.
-
activeTabColor, inactiveTabColor change the color of the underline of the tab. This is currently set to the device’s accent color as well if no value is passed through to the view.
ToDo:
- Implement reorganizing and dragging of tabs
- Add animations for selecting a tab
If any feedback please reach out to my email [email protected]