Open ryangittings opened 2 years ago
Hi, there are still work around - create a custom TabCoordinatable. There are some examples in this other thread where we talked about how to make a custom tabbar https://github.com/rundfunk47/stinsen/issues/42
Basically the idea is:
TabCoordinatable
func customize(_ view: AnyView) -> some View
to use a view which you made yourself as a tab barAh okay! I'm not 100% sure on this, but I'll see if I can hash something together.
Any idea how I'd get the stateful tab package above to work? I'd love to view some sample code or something, if some exists anywhere?
Thanks for all your help! 🙂
I don't have code example of the StatefulTabView, you could try use the func customize(_ view: AnyView) -> some View
and implment the StatefulTabView
there. Alternatively I think it is also possible to just not discard using of TabCoordinator
since the StatefulTabView
basically does the same thing, and use Stinsen in other places of the app.
Hey,
Firstly - thank you so much for the OS love, it's brilliant.
Secondly - I'm using a TabCoordinatable to power a TabView, but by doing so in SwiftUI you lose some default functionality like popping to the root on active tab tap, and scrolling to top on tab tap. As far as I'm aware there's no SwiftUI workaround, but there's a package that seems to do the trick:
https://github.com/NicholasBellucci/StatefulTabView
Cheers!