Hi, I am using NavigationLink on SwiftUI to navigate from one view to another. My problem is that i can not find a way to access the stacked Views on NavLink and go back to previous view programmatically, skipping the views in between. For example View A -> View B -> ViewC -> View D -> press back ---> View B (I need to remove ViewC from the NavView stack so on back i should go to viewB again.)
I am using NavigationLink(destination: , tag: , selection: ) { } constructor on the entire application.
Is there any way to access and manage the stacked views in NavigationLink?
Thank you.
Here it describe how to go back to the root view:
https://stackoverflow.com/questions/57334455/swiftui-how-to-pop-to-root-view
It is easily adaptable to return to another view in stack.