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 theCFBundleDocumentTypeskey specifies in the app’sInfo.plistfile.For detailed instructions about setting the
CFBundleDocumentTypeskey, 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.