In this project,I did not saw any code like 'push' 、'present' and 'dismiss'.
and in real-world, I must push some controller use navigationController.
with my own mind, I think should put this push or dismiss code in 'pageCoordinate',
some thing like this:
In ListCoordinator.swift :
extension ListCoordinator: ListViewModelCoordinatorDelegate
{
func listViewModelDidSelectData(_ viewModel: ListViewModel, data: DataItem)
{
detailCoordinator = DetailCoordinator(window: window, dataItem: data, nav:self.navigationController)
detailCoordinator?.delegate = self
detailCoordinator?.start() // within ,push detail controller
}
}
extension ListCoordinator: DetailCoordinatorDelegate
{
func detailCoordinatorDidFinish(detailCoordinator: DetailCoordinator)
{
self.detailCoordinator = nil
self.dismiss ...
}
}