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
CFBundleTypeNamein the application’sInfo.plistfile.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.