Hello!
As written in the post title, when I try to pop view programmatically, the next push transition doesn't have animations. Specifically, I pop view programmatically by removing the last element or all the elements from the path array.
If I pop the view by tapping the system back button, the animations on push transitions work correctly.
Here an example of the code I am using with the navigationStack:
struct ContentView: View {
@Binding var navigationPath: [Int]
var body: some View {
NavigationStack(path: $navigationPath) {
DetailView(level: 0)
.navigationDestination(for: Int.self, destination: DetailView.init)
}
}
}
Furthermore, I have noticed that if I embed the DetailView of my example in a List, the push animations works always in the correct way using the programmatically pop view.
Is there any workaround which could solve the problem?
Thank you in advance!
Selecting any option will automatically load the page