NavigationStack with NavigationLink - back button only works correctly one deep

So I have a navigationStack which has a NavigationLink that navigates to the next view. That view then has its own NavigationLink that navigate to a 3rd view.

if the user clicks on the back button on the 3rd view (View3) to return to the previous view (View 2), it goes right back to the starting view (View 1). an one else have this issue or know how to fix?

ios16b1

example below:

View 1:

NavigationStack {
                View2()
                    .navigationTitle("View 2")
            }

View 2:

List {
       VStack (alignment: .leading) {
                    NavigationLink("View 3", destination: {
                        View3()
                    })
       }
}
Answered by ngb in 721887022

seems to be fixed in ios16 beta 4

still an issue in ios16b3

I have the same issue in Beta 1, Beta 2 and Beta 3. Also, the animation going from View 2 to View 3 is somewhat weird.

Accepted Answer

seems to be fixed in ios16 beta 4

NavigationStack with NavigationLink - back button only works correctly one deep
 
 
Q