ApplicationCoordinator icon indicating copy to clipboard operation
ApplicationCoordinator copied to clipboard

Extending Router

Open LamourBt opened this issue 5 years ago • 0 comments

Kudos for putting together. (This is not an issue but a recommendation per say)

I think it would be useful if the following methods were part of Router's default implementation. It becomes vital when presenting new flows on top of existing flows.

func presentOnVisibleModule(_ module: Presentable?, animated: Bool) {
      guard let controller = module?.toPresent() else { return }
      rootController?.visibleViewController?.present(controller, animated: animated, completion: nil)
}
    
func dismissFromVisibleModule(animated: Bool) {
      rootController?.visibleViewController?.dismiss(animated: animated, completion: nil)
}

LamourBt avatar Jan 31 '20 20:01 LamourBt