Protocol

UIViewControllerRestoration

The methods that objects adopt so that they can act as a "restoration class” for view controllers during state restoration.

Declaration

protocol UIViewControllerRestoration

Overview

To use a class that adopts this protocol, you must assign that class to the restorationClass property of one of your app’s view controllers. The method in this protocol should be used to create the view controller, if it does not yet exist, or return an existing view controller object, if one does exist.

Topics

Creating the View Controller

static func viewController(withRestorationIdentifierPath: [String], coder: NSCoder) -> UIViewController?

Asks the receiver to provide the view controller that corresponds to the specified identifier information.

Required.

Relationships

Conforming Types

See Also

Interface Restoration

Restoring Your App’s State

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

Preserving Your App's UI Across Launches

Return your app to its previous state after it is terminated by the system.

protocol UIObjectRestoration

The interface that restoration classes use to restore preserved objects.

protocol UIStateRestoring

Methods for adding objects to your state restoration archives.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software