In tvOS when using NavigationStack inside NavigationSplitView as below:
@State private var selectedItem: String?
@State private var navigationPath = NavigationPath() // Track navigation state manually
var body: some View {
NavigationSplitView {
List(selection: $selectedItem) {
Button("Item 1") { selectedItem = "Detail View 1" }
Button("Item 2") { selectedItem = "Detail View 2" }
}
} detail: {
NavigationStack(path: $navigationPath) {
DetailView()
.navigationDestination(for: String.self) { value in
Text("New Screen: \(value)")
}
}
}
}
}
This example completely breaks the animation inside NavigationStack while navigating between different views, using withAnimation
also breaks the navigation as the old view seems to be still in stack and is shown in the new view background.
I have also submitted bug report: https://feedbackassistant.apple.com/feedback/16933927