Instance Method

className(for:)

Returns the class name with which this archiver encodes instances of a given class.

Declaration

func className(for cls: AnyClass) -> String?

Parameters

cls

The class for which to determine the translation mapping.

Return Value

The class name with which the receiver encodes instances of cls. Returns nil if the receiver does not have a translation mapping for cls. The class’s separate translation map is not searched.

See Also

Managing Classes and Class Names

class func setClassName(String?, for: AnyClass)

Sets a global translation mapping to encode instances of a given class with the provided name, rather than their real name.

class func className(for: AnyClass) -> String?

Returns the class name with which the archiver class encodes instances of a given class.

func setClassName(String?, for: AnyClass)

Sets a mapping for this archiver to encode instances of a given class with the provided name, rather than their real name.