I would like to preserve my application's state in XCode 6 and iOS 8. However, all the information I can find refers to storyboards and restoration identifiers, but I am not using storyboards.
I am sure I could make sense of all these would it not be for one major thing: I can't seem to find the field for the restoration ID for View Controllers in Xcode 6. I have found the ones for views, but every tutorial makes it clear that I have to make sure to tag the controller, not the view!
Any help is highly appreciated :)
Thx in advance
restorationIdentifier
is a view controller property as well as a view property.From the View Controller Class Reference documentation:
restorationIdentifier
The identifier that determines whether the view controller supports state restoration.State restoration is hierarchical in nature. As I'm sure you know, if you don't set the view controller's
restorationIdentifier
property, its view will not be saved, even if its view'srestorationIdentifier
property is set.Update:
You can programmatically set your view controller's
restorationIdentifier
when you initialize it:Since you're not using Storyboards, you can't inspect your view controller's properties. This is where the view controller's
restorationIdentifier
property is displayed.