Instance Method

documentBrowser(_:didImportDocumentAt:toDestinationURL:)

Tells the delegate that a document has been successfully imported.

Declaration

optional func documentBrowser(_ controller: UIDocumentBrowserViewController, didImportDocumentAt sourceURL: URL, toDestinationURL destinationURL: URL)

Parameters

controller

The document browser that performed the import action.

sourceURL

The document's original URL.

destinationURL

The document's URL after the import.

Discussion

To open the document as soon as it's imported:

  1. Open a new UIDocument subclass for the document (or use a file presenter and file coordination to access the document).

  2. Create a view controller to display the document.

  3. Present that view controller modally.