I am attempting to vary navigation bar title by tapping one in every of tabs in tabview. Is there an opportunity to do it?
This is the code I am utilizing:
struct ContentView: View {
var physique: some View {
NavigationStack {
TabView {
Tab("", systemImage: "home") {
HomeView()
}
Tab("", systemImage: "notice.textual content") {
AvailableOrdersView()
}
Tab("", systemImage: "checkmark.sq.") {
BookedOrdersView()
}
Tab("", systemImage: "gear") {
SettingsView()
}
}
.navigationTitle("TaxiApp")
.navigationBarTitleDisplayMode(.inline)
.toolbarBackground(.cyan, for: .navigationBar)
.toolbarBackgroundVisibility(.seen, for: .bottomBar)
.toolbarBackground(.cyan, for: .bottomBar)
}
}
}