-
Notifications
You must be signed in to change notification settings - Fork 280
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
Use as internal router #60
Comments
@alcarvalho this is a really interesting idea and we've thought about building an app entirely on top of this. @chrismaddern may have already explored this a bit. The matching logic is separate from the router, but the matcher is used internally. Feel free to submit a PR and we'll have a look. |
+1 The ancient Three20 library invented this concept, but it'll be nice to see a modern version. |
I have an internal implementation that repurpose deep link to support internal url routing. My few complains is that the current pattern force you to initialise a view controller with incomplete data because deep link instance is not pass down to the method Also, we can also pass deep link instance when doing calling presentation as well. This will enable so much flexibility (for example if I need to push more than 1 controller onto the navigation stack) |
It actually work out of the box, as long as you hold an instance to the router, you can just call handleURL and it will do the routing for you. |
A URL to ViewController would be awesome. |
I am not sure what you mean about the problem for initializing the view controller with incomplete data, but if you mean passing data on constructor that's true. But it's also a way to have the view controllers instantiated from the Storyboard and then configure it.
That's actually what I have implemented in #61 |
Closing in favor of #62 |
I would like to use this library as an internal router, too. Has anyone used for this yet?
In my view, for this use case, it would be nice to have a method in
DPLDeepLinkRouter
that returns the configured ViewController for a URL. To make it easier customizing transitions or even setting cached values on the target ViewController.Another thing that may help is to separate the logic for matching and creating the
DPLDeepLink
. With this I could subclass theDPLDeepLinkRouter
to make the above mentioned functionality available much easier.Any thoughts on this? I could do it and create PR.
The text was updated successfully, but these errors were encountered: