ApplicationCoordinator
ApplicationCoordinator copied to clipboard
Extending Router
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)
}