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

Navigation Titles don't appear in tabs #48

Open
Pranav-Wadhwa opened this issue Jul 18, 2023 · 1 comment
Open

Navigation Titles don't appear in tabs #48

Pranav-Wadhwa opened this issue Jul 18, 2023 · 1 comment

Comments

@Pranav-Wadhwa
Copy link

I have a TabView with 3 different UIPilotHosts as their views. These pilot show navigation titles normally fine, but when I put them inside the tab bar container, the titles don't show up. Toolbar items show up fine, but the titles don't. Additionally, if I use normal NavigationViews in the tab bar container, the titles show up fine. Is there any suggestions for how to resolve this?

@mrtrinh5293
Copy link

mrtrinh5293 commented Aug 9, 2023

I had to switch back to 1.3.1 to display the Navigation title and did this workaround:

TabView(selection: $tabSelection) {
	HomeBaseView(pageTitle: $pageTitle)
		.tag("Home")
		.tabItem {
			Label("Home", systemImage: "house")
		}
	TimerBaseView(pageTitle: $pageTitle)
		.tag("Timer")
		.tabItem {
			Label("Timer", systemImage: "clock")
		}
	...
}
.onReceive(Just(tabSelection)) {
	if $0 == "Home" {
		pageTitle = "Home"
	} else if $0 == "Timer" {
		pageTitle = "Timer"
        }
}

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

2 participants