Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BottomBarItem for each View #7

Open
ghost opened this issue Aug 22, 2020 · 1 comment
Open

BottomBarItem for each View #7

ghost opened this issue Aug 22, 2020 · 1 comment

Comments

@ghost
Copy link

ghost commented Aug 22, 2020

Hi, I don't know if this is possible but I'm not able to see it in the Wiki.

I have to link every BottomBarItem to an specific View, in the Wiki the only example is a Dynamic view which takes the selected bar item title and place it into the dynamic View.

Is it possible?

Thanks!

@ghost
Copy link
Author

ghost commented Aug 23, 2020

I was able to achieve this using an array of "views":

let views = [AnyView(NewsView()), AnyView(SearchView()), AnyView(FavoritesView())]

When the views are NavigationViews, they don't preserve the state when changing between tabs and the TabBar does not hide itself when navigating to a subview.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants