Instance Method

decodeRestorableStateWithCoder:

Decodes and restores state-related information for the view controller.

Declaration

- (void)decodeRestorableStateWithCoder:(NSCoder *)coder;

Parameters

coder

The coder object to use to decode the state of the view.

Discussion

Do not call this method directly. The system calls this method during the state restoration process so that you can restore your view controller to its previous state.

If your app supports state restoration, override this method for any view controllers for which you also overrode the encodeRestorableStateWithCoder: method. Your implementation of this method should use any saved state information to restore the view controller to its previous configuration. If your encodeRestorableStateWithCoder: method called super, this method should similarly call super at some point in its implementation.

See Also

Managing State Restoration

Restoring Your App’s State

Preserve and restore information related to the user’s current activities.

restorationIdentifier

The identifier that determines whether the view controller supports state restoration.

restorationClass

The class responsible for recreating this view controller when restoring the app'€™s state.

- encodeRestorableStateWithCoder:

Encodes state-related information for the view controller.

- applicationFinishedRestoringState

Called on restored view controllers after other object decoding is complete.