Guys, any updates here?
I'm experiencing this issue on iOS 27.1.
With DefaultToolbarItem(kind: .search, placement: .topBarTrailing) added, the search bar moves above the keyboard.
However, without it, the search bar does not appear at all when I press the minimized search button in the top bar's trailing position. Previously, it would show a search bar in the navigation bar (similiar to the gif provided in this thread).
By the way, iPadOS works fine. This issue occurs only on iOS.
Below is the test code that reproduces the issue.
struct ContentView: View {
@State var searchText: String = ""
var body: some View {
NavigationStack {
List(1...30, id: \.self) { number in
Text("\(number)")
}
.navigationTitle("Test")
.searchable(text: $searchText, placement: .toolbar)
.searchToolbarBehavior(.minimize)
.toolbar {
//DefaultToolbarItem(kind: .search, placement: .topBarTrailing)
ToolbarItemGroup(placement: .bottomBar) {
Text("1")
Spacer()
Text("2")
}
}
}
}
}
Topic:
UI Frameworks
SubTopic:
SwiftUI