View Code? Open in Web Editor
NEW
Example of how creating your custom TabBar in SwiftUI with the exatcly behavior as TabView/UITabBarController
customtabbar's Introduction
- Example of how create a custom TabBar in SwiftUI and avoiding navigation bugs (as me 😅)
- Built with Xcode 13.2
![Xcode](https://camo.githubusercontent.com/71cd7cd71e67bd0543e98b204643032702b507ceafd7af2964ff746719cde9c1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f58636f64652d31332e322d626c75652e737667)
- Simple example composed by:
- TabBarView.swift - TabBar component
- TabBarIcon.swift - TabBarIcon component corresponding to tab from TabBarView
- ViewRouter.swift - Router used to shared state between the TabBarIcons and TabBarView
- ContentView.swift - View holding the ViewRouter instance and change between screens based on tab selections.
customtabbar's People
Contributors
Watchers