-
Notifications
You must be signed in to change notification settings - Fork 400
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
Setting .introspect on to a NavigationStack breaks the iOS 26 TabView searchable behavior.
In the below example, without Introspecting, when tapped on search tab it performs the expect iOS 26 animation. With introspect it just switches tab while retaining the top search bar.
import SwiftUI
struct SampleExample: View {
var body: some View {
TabView {
Tab("1", systemImage: "1.square") {
Sample(label: "1")
}
Tab("2", systemImage: "1.square") {
Sample(label: "2")
}
Tab(role: .search) {
Search()
}
}
}
}
struct Search: View {
@State private var searchText = ""
var body: some View {
NavigationStack {
List {
Text("Search")
}
.navigationTitle("Search")
.searchable(text: $searchText)
}
.introspect(.navigationStack, on: .iOS(.v26)) { stack in // Search tab is not working properly with this.
}
}
}
struct Sample: View {
var label: String
var body: some View {
NavigationStack {
List {
Text(label)
}
.navigationTitle(label)
}
}
}
Checklist
- I have read the README before submitting this report.
- This issue hasn't been addressed in an existing GitHub issue or discussion.
Expected behavior
No response
Actual behavior
No response
Steps to reproduce
- Remove the .introspect to see correct behavior, and add back (already in sample code) to see the issue.
Version information
1.4.0
Destination operating system
iOS 26.0
Xcode version information
Xcode 26.0.0
Swift Compiler version information
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working