The new .searchToolbarBehavior(.minimized) modifier leads to a choppy animation both on device and SwiftUI canvas (iOS 26.2):
I assume this is not the intended behaviour (reported under FB21572657), but since I almost never receive any feedback to my reports, I wanted to see also here, whether you experience the same, or perhaps I use the modifier incorrectly?
struct SwiftUIView: View {
@State var isSearchPresented: Bool = false
@State var searchQuery: String = ""
var body: some View {
TabView {
Tab {
NavigationStack {
ScrollView {
Text(isSearchPresented.description)
}
.navigationTitle("Test")
}
.searchable(text: $searchQuery, isPresented: $isSearchPresented)
.searchToolbarBehavior(.minimize) // **Choppy animation comes from here?**
} label: {
Label("Test", systemImage: "calendar")
}
Tab {
Text("123")
} label: {
Label("123", systemImage: "globe")
}
}
}
}
#Preview {
if #available(iOS 26, *) {
SwiftUIView()
} else {
// Fallback on earlier versions
}
}