Contents

restorationClass

The class responsible for recreating this view controller when restoring the app’s state.

Declaration

var restorationClass: (any UIViewControllerRestoration.Type)? { get set }

Mentioned in

Discussion

If a view controller has an associated restoration class, the viewController(withRestorationIdentifierPath:coder:) method of that class is called during state restoration. That method is responsible for returning the view controller object that matches the indicated view controller. If you do not specify a restoration class for your view controller, the state restoration engine asks your app delegate to provide the view controller object instead.

The restoration class must conform to the UIViewControllerRestoration protocol.

See Also

Managing state restoration