Instance Method

setClass:forClassName:

Sets a translation mapping on this unarchiver to decode objects encoded with a given class name as instances of a given class instead.

Declaration

- (void)setClass:(Class)cls forClassName:(NSString *)codedName;

Parameters

cls

The class with which to replace instances of the class named codedName.

codedName

The ostensible name of a class in an archive.

Discussion

When decoding, the receiver’s translation map overrides any translation that may also be present in the class’s map (see setClass:forClassName:).

See Also

Managing Class Names

+ setClass:forClassName:

Sets a global translation mapping to decode objects encoded with a given class name as instances of a given class instead.

+ classForClassName:

Returns the class from which this unarchiver instantiates an encoded object with a given class name.

- classForClassName:

Returns the class from which this unarchiver instantiates an encoded object with a given class name.