Instance Method


Decodes and restores state-related information for the view.


func decodeRestorableState(with coder: NSCoder)



The coder object to use to decode the state of the view.


If your app supports state restoration, you should override this method for any views for which you also overrode the encodeRestorableState(with:) method. Your implementation of this method should use any saved state information to restore the view to its previous configuration. If your encodeRestorableState(with:) method called super, this method should similarly call super at some point in its implementation.

See Also

Preserving and Restoring State

var restorationIdentifier: String?

The identifier that determines whether the view supports state restoration.

func encodeRestorableState(with: NSCoder)

Encodes state-related information for the view.