Contents

archiver(_:willReplace:with:)

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

Declaration

optional func archiver(_ archiver: NSKeyedArchiver, willReplace object: Any?, with newObject: Any?)

Parameters

  • archiver:

    The archiver that sent the message.

  • object:

    The object being replaced in the archive.

  • newObject:

    The object replacing object in the archive.

Discussion

This method is called even when the delegate itself is doing, or has done, the substitution. The delegate may use this method if it is keeping track of the encoded or decoded objects.

See Also

Encoding Data and Objects