- Notifications
You must be signed in to change notification settings - Fork 9
Description
It took me some time to figure out it's working because one essential piece of information is missing here.
I was confused about how the presentation mode variable is being mutated.
So in the code, isActive is initially false, but as soon as we tap on the "Push" navigation link, its value is automatically set to true, hence we can see the second view.
We keep on going in the navigation stack. When we want to pop to root view, we toggle the value of this environment variable, hence setting it to false.
This makes the navigation link inActive and all the pushed Views are popped off. So please add this line somewhere in read me.
"When a user taps on a navigation link embedded in a navigation view, the 'isActive' property of this link is automatically set to true."
Thanks