Contents

init(forOpeningFilesWithContentTypes:)

Initializes and returns a document browser view controller that can open the specified file types.

Declaration

init(forOpeningFilesWithContentTypes allowedContentTypes: [String]?)

Parameters

  • allowedContentTypes:

    An array of uniform type identifiers (UTIs). The document browser can open only the document types that these UTIs specify. If you pass nil, the browser uses the document types that the CFBundleDocumentTypes key specifies in the app’s Info.plist file.

    For detailed instructions about setting the CFBundleDocumentTypes key, see the Setting Up A Document Browser App section of Setting Up A Document Browser App.

    For more information about UTIs, see Uniformtypeidentifiers.

Mentioned in

Return Value

Returns a newly initialized document browser view controller.

See Also

Deprecated symbols