UIPilot
UIPilot copied to clipboard
Navigation Titles don't appear in tabs
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?
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"
}
}