UIViewControllerRestoration protocol should be adopted by classes that act as "restoration classes” for view controllers during the state restoration process. 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.
- iOS 6.0+
- tvOS 9.0+
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.