UIPilot icon indicating copy to clipboard operation
UIPilot copied to clipboard

Navigation Titles don't appear in tabs

Open Pranav-Wadhwa opened this issue 2 years ago • 1 comments

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?

Pranav-Wadhwa avatar Jul 18 '23 05:07 Pranav-Wadhwa

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"
        }
}

mrtrinh5293 avatar Aug 09 '23 17:08 mrtrinh5293