Package apple.uikit.protocol
Interface UIStateRestoring
-
- All Known Implementing Classes:
ABNewPersonViewController,ABPeoplePickerNavigationController,ABPersonViewController,ABUnknownPersonViewController,ASAccountAuthenticationModificationViewController,ASCredentialProviderViewController,AUGenericViewController,AUViewController,AVPictureInPictureVideoCallViewController,AVPlayerViewController,CABTMIDICentralViewController,CABTMIDILocalPeripheralViewController,CNContactPickerViewController,CNContactViewController,EKCalendarChooser,EKEventEditViewController,EKEventViewController,FPUIActionExtensionViewController,GCEventViewController,GKAchievementViewController,GKFriendRequestComposeViewController,GKGameCenterViewController,GKLeaderboardViewController,GKMatchmakerViewController,GKTurnBasedMatchmakerViewController,GLKViewController,ILClassificationUIExtensionViewController,INUIAddVoiceShortcutViewController,INUIEditVoiceShortcutViewController,MCBrowserViewController,MFMailComposeViewController,MFMessageComposeViewController,MKLookAroundViewController,MPMediaPickerController,MPMoviePlayerViewController,MSMessagesAppViewController,MSStickerBrowserViewController,PHPickerViewController,PKAddPassesViewController,PKAddPaymentPassViewController,PKAddSecureElementPassViewController,PKPaymentAuthorizationViewController,PKShareSecureElementPassViewController,QLPreviewController,RPBroadcastActivityViewController,RPPreviewViewController,SFSafariViewController,SKCloudServiceSetupViewController,SKStoreProductViewController,SLComposeServiceViewController,SLComposeViewController,STWebpageController,SWRemoveParticipantAlertController,TWTweetComposeViewController,UIActivityViewController,UIAlertController,UICloudSharingController,UICollectionViewController,UIColorPickerViewController,UIDocumentBrowserViewController,UIDocumentMenuViewController,UIDocumentPickerExtensionViewController,UIDocumentPickerViewController,UIDocumentViewController,UIFontPickerViewController,UIImagePickerController,UIInputViewController,UINavigationController,UIPageViewController,UIReferenceLibraryViewController,UISearchContainerViewController,UISearchController,UISplitViewController,UITabBarController,UITableViewController,UIVideoEditorController,UIViewController,VNDocumentCameraViewController
public interface UIStateRestoringConform to this protocol if you want your objects to participate in state restoration. To participate in state restoration, the function registerObjectForStateRestoration must be called for the object.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default voidapplicationFinishedRestoringState()applicationFinishedRestoringState is called on all restored objects that implement the method *after* all other object decoding has been done (including the application delegate).default voiddecodeRestorableStateWithCoder(@NotNull NSCoder coder)default voidencodeRestorableStateWithCoder(@NotNull NSCoder coder)Methods to save and restore state for the object.default @Nullable UIObjectRestorationobjectRestorationClass()The restoration class specifies a class which is consulted during restoration to find/create the object, rather than trying to look it up implicitlydefault @Nullable UIStateRestoringrestorationParent()The parent property is used to scope the restoration identifier path for an object, to disambiguate it from other objects that might be using the same identifier.
-
-
-
Method Detail
-
applicationFinishedRestoringState
default void applicationFinishedRestoringState()
applicationFinishedRestoringState is called on all restored objects that implement the method *after* all other object decoding has been done (including the application delegate). This allows an object to complete setup after state restoration, knowing that all objects from the restoration archive have decoded their state.
-
decodeRestorableStateWithCoder
default void decodeRestorableStateWithCoder(@NotNull @NotNull NSCoder coder)
-
encodeRestorableStateWithCoder
default void encodeRestorableStateWithCoder(@NotNull @NotNull NSCoder coder)Methods to save and restore state for the object. If these aren't implemented, the object can still be referenced by other objects in state restoration archives, but it won't save/restore any state of its own.
-
objectRestorationClass
@Nullable default @Nullable UIObjectRestoration objectRestorationClass()
The restoration class specifies a class which is consulted during restoration to find/create the object, rather than trying to look it up implicitly
-
restorationParent
@Nullable default @Nullable UIStateRestoring restorationParent()
The parent property is used to scope the restoration identifier path for an object, to disambiguate it from other objects that might be using the same identifier. The parent must be a restorable object or a view controller, else it will be ignored.
-
-