|
I have 3 views. A, B and C. A has a NavigationLink that opens B, B has a NavigationLink to open C and C has a NavigationLink that opens B again. Basicly using B and C you can open them all the time. Can I somehow edit the default Back button to exit B and C no matter how many times I have opened them and just go back to A? |
|
As I am not sure how you have your A, B, and C views set up. I have created navigation using enums. Which basically allows you to control where you can navigate. The main logic for navigating back is almost the same as in your previous post. We manage our navigation path and when we need to go back we just remove all our navigation paths which in turn pops all the views and navigates us to initial screen.
|
|
SPONSORED Get accurate app localizations in minutes using AI. Choose your languages & receive translations for 40+ markets!
Sponsor Hacking with Swift and reach the world's largest Swift community!
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.