Protocol: NSKeyedArchiverDelegate

Overview

The NSKeyedArchiverDelegate protocol defines the optional methods implemented by delegates of NSKeyedArchiver objects.Informs the delegate that a given object has been encoded.Informs the delegate that object is about to be encoded.Informs the delegate that one given object is being substituted for another given object.Notifies the delegate that encoding has finished.Notifies the delegate that encoding is about to finish.

Instance Method Summary (collapse)

Instance Method Details

- (Object) archiver(archiver, didEncodeObject:object)

Informs the delegate that a given object has been encoded. 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).

Parameters:

  • archiver (NSKeyedArchiver)

    The archiver that sent the message.

  • object (Object)

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

Returns:

- (Object) archiver(archiver, willEncodeObject:object)

Informs the delegate that object is about to be encoded. This method is called after the original object may have replaced itself with replacementObjectForKeyedArchiver::.This method is called whether or not the object is being encoded conditionally.This method is not called for an object once a replacement mapping has been set up for that object (either explicitly, or because the object has previously been encoded). This method is also not called when nil is about to be encoded.

Parameters:

  • archiver (NSKeyedArchiver)

    The archiver that sent the message.

  • object (Object)

    The object that is about to be encoded. This value is never nil.

Returns:

  • (Object)

    Either object or a different object to be encoded in its stead. The delegate can also modify the coder state. If the delegate returns nil, nil is encoded.

- (Object) archiver(archiver, willReplaceObject:object, withObject:newObject)

Informs the delegate that one given object is being substituted for another given object. 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.

Parameters:

  • archiver (NSKeyedArchiver)

    The archiver that sent the message.

  • object (Object)

    The object being replaced in the archive.

  • newObject (Object)

    The object replacing object in the archive.

Returns:

- (Object) archiverDidFinish(archiver)

Notifies the delegate that encoding has finished.

Parameters:

Returns:

- (Object) archiverWillFinish(archiver)

Notifies the delegate that encoding is about to finish.

Parameters:

Returns: