<!--
{
  "availability" : [
    "iOS: 6.0.0 -",
    "iPadOS: 6.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIViewController/restorationClass",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIViewController(py)restorationClass"
  },
  "title" : "restorationClass"
}
-->

# restorationClass

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

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

## Discussion

If a view controller has an associated restoration class, the [`viewController(withRestorationIdentifierPath:coder:)`](/documentation/UIKit/UIViewControllerRestoration/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`](/documentation/UIKit/UIViewControllerRestoration) protocol.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)