You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is mostly a question (you can tag it as question), on what's the best approach to route a deeplink to an already instantiated UIViewController.
Like having N viewControllers on a UITabBarController, I would like to have one of them to present itself or push another one to the stack.
I guess this could be done with a block like this, where I have available the existingTargetVC:
Hi @crsantos. You should be able to achieve what you want in a DPLRouteHandler subclass by overriding 3 methods.
Override - (UIViewController <DPLTargetViewController> *)targetViewController and return the already instantiated view controller you want.
Override - (UIViewController *)viewControllerForPresentingDeepLink:(DPLDeepLink *)deepLink and return the view controller you want the target view controller presented, pushed, etc. from (e.g. navigation controller, tab bar controller, some custom container controller, or just another view controller)
Override - (void)presentTargetViewController:(UIViewController <DPLTargetViewController> *)targetViewController inViewController:(UIViewController *)presentingViewController. You can do whatever you want here. You have the presenting controller and the target view controller. If your presenting controller is a tab bar controller, you can change the selected tab to the view controller that is your target view controller. If its a navigation controller, make the top view controller your target view controller, etc.
This is mostly a question (you can tag it as question), on what's the best approach to route a deeplink to an already instantiated
UIViewController
.Like having
N
viewControllers on aUITabBarController
, I would like to have one of them to present itself or push another one to the stack.I guess this could be done with a block like this, where I have available the
existingTargetVC
:but I can't see any way to do it in a
DPLRouteHandler
subclass. I would prefer to have that logic separated.Any ideas?
The text was updated successfully, but these errors were encountered: