Contents

replacementObject(for:)

Overridden by subclasses to substitute another object for itself during archiving.

Declaration

func replacementObject(for archiver: NSArchiver) -> Any?

Parameters

  • archiver:

    The archiver creating an archive.

Return Value

The object to substitute for the receiver during archiving.

Discussion

This method is invoked by NSArchiver. NSObject’s implementation returns the object returned by replacementObject(for:).

See Also

Archiving