unarchiver(_:didDecode:)
Informs the delegate that a given object has been decoded.
Declaration
optional func unarchiver(_ unarchiver: NSKeyedUnarchiver, didDecode object: Any?) -> Any?Parameters
- unarchiver:
An unarchiver for which the receiver is the delegate.
- object:
The object that has been decoded.
objectmay benil.
Return Value
The object to use in place of object. The delegate can either return object or return a different object to replace the decoded one. In apps using ARC, the delegate should only return nil if object itself is nil. In apps not using ARC, the delegate can return nil to indicate that the decoded value is unchanged—that is, object will be decoded.
Discussion
This method is called after object has been sent init(coder:) and awakeAfter(using:).
The delegate may use this method to keep track of the decoded objects.