In chapter 24 a scene coordinator is used, which I really like the idea of in MVVM. My question is “Do all view controllers need to have a UINavigationController sitting in front of it?”
I ask this, because when I try to segue to another view controller (that does not have it’s own nav controller) I have issues with the mutating bindViewModel
that should accept the View Model. I receive the error Argument passed to call that takes no arguments
when calling vc.bindViewModel(to: viewModel)
case .purchaseOrderList(let viewModel):
let vc = storyboard.instantiateViewController(withIdentifier: "PurchaseOrderList") as! PurchaseOrderListViewController
// var vc = nc.viewControllers.first as! PurchaseOrderListViewController
vc.bindViewModel(to: viewModel) // <--- ERROR: Argument passed to call that takes no arguments