Closed wojciech-kulik closed 2 years ago
I've found the problem! I forgot that you are using autoclosure
and I was doing something like this:
let module = builder.build()
rootViewController.pushViewController(Inject.ViewControllerHost(module), animated: true)
replacing it with:
let module = Inject.ViewControllerHost(self.builder.build())
rootViewController.pushViewController(module, animated: true)
solved the problem :)
I'm trying to integrate the existing UIKit project with Inject. I wrapped ViewController with
Inject.ViewControllerHost(...)
and presented. I noticed that when I update ViewController it does hot-reload but doesn't callviewDidLoad
.We set up constraints and controls in
viewDidLoad
. Therefore, views and constraints are not reloaded until I leave the screen and show it again.What is the recommended way of using it? Preferably without modifying ViewController.