Contents

documentClass(forType:)

Returns the NSDocument subclass associated with a given document type.

Declaration

func documentClass(forType typeName: String) -> AnyClass?

Parameters

  • typeName:

    The name of a document type, specified by CFBundleTypeName in the application’s Info.plist file.

    The document type must be one the receiver can read.

Return Value

Returns the NSDocument subclass associated with documentTypeName. If the class cannot be found, returns nil.

See Also

Managing Document Types