Coordinator-MVVM-Rx-Example icon indicating copy to clipboard operation
Coordinator-MVVM-Rx-Example copied to clipboard

Coordinator-MVVM + shouldRestoreApplicationState

Open mehdok opened this issue 5 years ago • 0 comments

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 ?

mehdok avatar Nov 08 '18 07:11 mehdok