Contents

archiver(_:didEncode:)

Informs the delegate that a given object has been encoded.

Declaration

optional func archiver(_ archiver: NSKeyedArchiver, didEncode object: Any?)

Parameters

  • archiver:

    The archiver that sent the message.

  • object:

    The object that has been encoded. object may be nil.

Discussion

The delegate might restore some state it had modified previously, or use this opportunity to keep track of the objects that are encoded.

This method is not called for conditional objects until they are actually encoded (if ever).

See Also

Related Documentation

  • Archives and Serializations Programming Guide

Encoding Data and Objects