Type Method

registerObjectForStateRestoration:restorationIdentifier:

Registers a custom object for use with the state restoration system.

Declaration

+ (void)registerObjectForStateRestoration:(id<UIStateRestoring>)object restorationIdentifier:(NSString *)restorationIdentifier;

Parameters

object

The object to be registered with the restoration archive. The object must adopt the UIStateRestoring protocol. This parameter must not be nil.

restorationIdentifier

The restoration identifier for the object. UIKit uses this parameter to distinguish the object from other objects in the archive. This parameter must not be nil.

Discussion

You use this method to register objects that you want to save as part of the overall state restoration process. Registering the object makes it available for inclusion in the restoration archive but does not automatically include it. To include the object, refer to it from one of your other interface objects. For example, you might write out a reference to the object from the encodeRestorableStateWithCoder: method of one of your view controllers.

See Also

Managing the State Restoration Behavior

- extendStateRestoration

Tells the app that your code is restoring state asynchronously.

- completeStateRestoration

Tells the app that your code has finished any asynchronous state restoration.

- ignoreSnapshotOnNextApplicationLaunch

Prevents the app from using the recent snapshot image during the next launch cycle.