Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pop to parent route? #13

Open
samritchie opened this issue Aug 19, 2016 · 0 comments
Open

Pop to parent route? #13

samritchie opened this issue Aug 19, 2016 · 0 comments

Comments

@samritchie
Copy link

The Readme sez:

The user tapping a back button is easy to capture and generate and action that updates the State Path which causes the UI change.

I can capture a back navigation by doing the awkward viewWillDisappear/isMovingFromParentViewController dance, but updating the route is difficult unless the VC is aware of its exact position in the stack. If you’re using url-style strings, you could try to chop the last path component off, but there’s no guarantee this is the right route. If you’re using enums like any right-minded string-phobic Swift dev, you’re SOL.

The only place the parent route is reliably known is in the router stack, but there doesn’t seem to be any sensible way to access this. Is this something anyone has managed to solve?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant