Coordinator-MVVM-Rx-Example
Coordinator-MVVM-Rx-Example copied to clipboard
Coordinator-MVVM + shouldRestoreApplicationState
I have implemented The MVVM+Coordinator
in my app and now i want to preserve my app state
.
so i enabled saving app state via:
public func application(_ application: UIApplication, shouldSaveApplicationState coder: NSCoder) -> Bool {
return true
}
public func application(_ application: UIApplication, shouldRestoreApplicationState coder: NSCoder) -> Bool {
return true
}
and some other codes to save and restore some variable in my ViewControllers
.
The problem is in MVVMC
approach each coordinator result attached to previous ViewController
and just creating view controllers for restoration is not sufficient.
So how can i implement this ?