Contents

unarchiver(_:willReplace:with:)

Informs the delegate that one object is being substituted for another.

Declaration

optional func unarchiver(_ unarchiver: NSKeyedUnarchiver, willReplace object: Any, with newObject: Any)

Parameters

  • unarchiver:

    An unarchiver for which the receiver is the delegate.

  • object:

    An object in the archive.

  • newObject:

    The object with which unarchiver will replace object.

Discussion

This method is called even when the delegate itself is doing, or has done, the substitution with unarchiver(_:didDecode:).

The delegate may use this method if it is keeping track of the encoded or decoded objects.

See Also

Decoding Objects