What is RestorationIdentifier?
ios, iphone, objective-c, uinavigationcontroller
Solution
Consider that you want to allow your user to close the app and then return to exactly where they were when they open the app again. And you should want to do that. Broadly you have 2 options:
- Implement it yourself, saving everything into user defaults or similar and reconstructing the view hierarchy yourself
- Use Apple State Preservation which will automatically rebuild the view hierarchy for you and which you can tie into to save and restore other pertinent information
Option 2 is behind the use of the restoration id (so that the view hierarchy can be recorded and rebuilt).
Problem
I am wondering what RestorationIdentifier is, and why would we use it? I saw RestorationIdentifier on MMDrawerController. MMDrawerController using like this : ` ``` [self setRestorationIdentifier:@"MMExampleCenterControllerRestorationKey"];` ```