You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to create model at first in AppCoordinator and don't want to get instance whole project. I don't know if this is the best way but I need my updated model in all the view controllers.
My code is like below, router is assigning, but model is still nil in VC? Why?
`class AppCoordinator {
var root: Presentable?
private var person: Person
init() {
self.person = Person()
}
func start(in window: UIWindow) {
root = {
if MyUserDefaults.firstLaunch { //Uygulamaya ilk kez giriş yapılmışsa
return GuideCoordinator(model: person)
} else if FirestoreHandler.authUID == nil { //Daha önce giriş yapılmış ancak user authenticated değilse
return AuthCoordinator(model: person)
} else { //Daha önce giriş yapılmışsa ve kullanıcı authenticated ise
return AuthCoordinator(model: person) //TODO: MainCoordinator()
}
}()
root?.setRoot(for: window)
}
}
class AuthCoordinator: NavigationCoordinator {
private let disposeBag = DisposeBag()
private var person: Person
Hi,
Thanks for the MVC example and the sliders.
I want to create model at first in AppCoordinator and don't want to get instance whole project. I don't know if this is the best way but I need my updated model in all the view controllers.
My code is like below, router is assigning, but model is still nil in VC? Why?
`class AppCoordinator {
var root: Presentable?
private var person: Person
}
class AuthCoordinator: NavigationCoordinator {
private let disposeBag = DisposeBag()
private var person: Person
}`
Thanks!
The text was updated successfully, but these errors were encountered: