Open zhihuitang opened 6 years ago
another approach is to have Router methods signatures like :
func showMyModule(from view: UIViewController, moduleOut: ModuleOutParameters)
and pass view from presenter.
Moreover, Router should not be responsible for creating and setting up modules. It's Assembly layer responsibility. Each modue should have Assembly that handles dependency injections and stuff.
In my understanding, the Router should hold Presenter only, not Controller.![](https://monosnap.com/file/mQVFZIu5SaM2ZzYgrVa0xTTdBfP3wu.png)
But in your VIPER framework, the controller is held by Router.