Hello, I would like that the navigation title "View 1" stays large after going to a subview and back. The problem only occurs with a searchable modifier with the always shown settings. Any ideas?
struct NavigationTestView: View {
var body: some View {
TabView {
NavigationStack {
List {
NavigationLink {
Text("Sub View")
.navigationTitle("View 2")
} label: {
Text("press me")
}
}
.navigationTitle("View 1")
.searchable(text: .constant(""), placement: .navigationBarDrawer(displayMode: .always))
}
.tabItem {
Label("TestView", systemImage: "testtube.2")
}
}
}
}
struct NavigationTestView_Previews: PreviewProvider {
static var previews: some View {
NavigationTestView()
}
}