Performs any custom configuration of the document picker view controller.
- iOS 8.0+
- Mac Catalyst 13.0+
The type of file-transfer operation that the document picker performs. For a list of valid modes, see Document Picker Modes.
The system calls this method when a host app presents a document picker view controller for your Document Picker extension. Override this method to provide a custom user interface based on the provided mode.
Different modes may require different user interfaces. For example, the UIDocumentPickerModeImport and UIDocumentPickerModeOpen modes should let the user explore the available documents, whereas the UIDocumentPickerModeExportToService and UIDocumentPickerModeMoveToService modes let the user select the destination.
When overriding this method, examine the mode and present an appropriate user interface for the task at hand. If the differences between the modes are significant, consider creating separate child view controllers for each mode and then present the appropriate child in this method.
If your extension can manage multiple file types, check the
valid property and make sure you are presenting only files that match one or more of the specified types.