I not familiar with storyboards, i have superclass for UIViewController, that have init method like that:
convenience init(viewModel: Any){
self.init()
self.viewModel = viewModel
}
So, when viewDidLoad
is called, i already have viewModel that is not nil.
And i can easy create view controller with model like that:
let pvc = ProductViewController(viewModel: pvm)
self.navController?.pushViewController(pvc, animated: true)
How to add this capability to storyboards? What i want is, pass model to constructor, to be sure that when viewDidLoad is called model is exist.