admin管理员组文章数量:1290265
I simply tried to install Hot reloading tool while developing an iOS app.
Installed pod using
pod 'InjectHotReload'
Added:
#if DEBUG Bundle(path: "/Applications/InjectionIII.app/Contents/Resources/iOSInjection.bundle")?.load() #endif
at the end of
didFinishWithLaunching
.Where I instantiate my UIViewController I added an import:
import InjectHotReload
4 ... and then:
container.register(LoginViewController.self) { resolver in
let view = InjectConfiguration.ViewHost(resolver.resolve(LoginView.self)!)
let viewModel = resolver.resolve(LoginViewModelable.self)!
let router = resolver.resolve(LoginRoutable.self)!
let controller = resolver.resolve(AccountControllerable.self)!
let reactiveKeyboard = resolver.resolve(ReactiveKeyboardable.self)!
return InjectConfiguration.ViewControllerHost(LoginViewController(
view: view,
viewModel: viewModel,
router: router,
controller: controller,
reactiveKeyboard: reactiveKeyboard
))
}
And the app on load look like this:
When I change background color:
the app does nothing. After I press back button and then again push controller on the stack, everything works:
What am I doing wrong?
版权声明:本文标题:ios - Hot reloading need to push view controller again to see the changes instead of on the fly - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741446889a2379253.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论