How to pass data between views using Coordinator pattern in Swift
['Benoit Pasquier']
Benoit Pasquier - Swift, Data and more
store ( coordinatorB ) } } // responsible of flow to ViewControllerB class CoordinatorB : BaseCoordinator { let navigationController : UINavigationController let data : AnyObject init ( navigationController : UINavigationController , data : AnyObject ) { self . navigationController = navigationController } func start () { let viewModel = ViewModelA (...) let viewController = ViewControllerA ( viewModel : viewModel ) viewModel . data = data } func start () { let viewModel = ViewModelB ( data : data ) let viewController = ViewControllerB ( viewModel : viewModel ) self .