Instance Method

class(forClassName:)

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

Declaration

func `class`(forClassName codedName: String) -> AnyClass?

Parameters

codedName

The name of a class.

Return Value

The class from which the receiver instantiates an encoded object with the class name codedName. Returns nil if the receiver does not have a translation mapping for codedName.

Discussion

The class’s separate translation map is not searched.

See Also

Managing Class Names

class func setClass(AnyClass?, forClassName: String)

Adds a class translation mapping to NSKeyedUnarchiver whereby objects encoded with a given class name are decoded as instances of a given class instead.

class func `class`(forClassName: String) -> AnyClass?

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

func setClass(AnyClass?, forClassName: String)

Adds a class translation mapping to the receiver whereby objects encoded with a given class name are decoded as instances of a given class instead.