Instance Property

restorationIdentifier

The identifier that determines whether the view supports state restoration.

Declaration

@property(nonatomic, copy) NSString *restorationIdentifier;

Discussion

This property indicates whether state information in the view should be preserved; it is also used to identify the view during the restoration process. The value of this property is nil by default, which indicates that the view’s state does not need to be saved. Assigning a string object to the property lets the owning view controller know that the view has relevant state information to save.

Assign a value to this property only if you are implementing a custom view that implements the encodeRestorableStateWithCoder: and decodeRestorableStateWithCoder: methods for saving and restoring state. You use those methods to write any view-specific state information and subsequently use that data to restore the view to its previous configuration.

See Also

Preserving and Restoring State

- encodeRestorableStateWithCoder:

Encodes state-related information for the view.

- decodeRestorableStateWithCoder:

Decodes and restores state-related information for the view.