Protocol

UIDocumentInteractionControllerDelegate

The UIDocumentInteractionControllerDelegate protocol includes methods you can implement to respond to messages from a document interaction controller. Use this protocol to participate when document previews are displayed and when a document is about to be opened by another application. You can also use this protocol to respond to commands (such as “copy” and “print”) from a document interaction controller’s options menu.

Overview

If you use a document interaction controller to display a document preview, your delegate must implement the documentInteractionControllerViewControllerForPreview(_:) method. All other methods of this protocol are optional.

For more information about using a document interaction controller, see UIDocumentInteractionController.

Symbols

Configuring the Parent View Controller

func documentInteractionControllerViewControllerForPreview(UIDocumentInteractionController)

Called when a document interaction controller needs a view controller for presenting a document preview.

func documentInteractionControllerViewForPreview(UIDocumentInteractionController)

Called when a document interaction controller needs the starting point for animating the display of a document preview.

func documentInteractionControllerRectForPreview(UIDocumentInteractionController)

Called when a document interaction controller needs the rectangle to use as the starting point for animating the display of a document preview.

Presenting the User Interface

func documentInteractionControllerWillBeginPreview(UIDocumentInteractionController)

Called when a document interaction controller is about to display a preview for its document.

func documentInteractionControllerDidEndPreview(UIDocumentInteractionController)

Called when a document interaction controller has dismissed its document preview.

func documentInteractionControllerWillPresentOptionsMenu(UIDocumentInteractionController)

Called when a document interaction controller is about to display an options menu.

func documentInteractionControllerDidDismissOptionsMenu(UIDocumentInteractionController)

Called when a document interaction controller has dismissed its options menu.

func documentInteractionControllerWillPresentOpenInMenu(UIDocumentInteractionController)

Called when a document interaction controller is about to display an Open In menu.

func documentInteractionControllerDidDismissOpenInMenu(UIDocumentInteractionController)

Called when a document interaction controller has dismissed its Open In menu.

Opening Files

func documentInteractionController(UIDocumentInteractionController, willBeginSendingToApplication: String?)

Called when a document interaction controller’s document is about to be opened by the specified application.

func documentInteractionController(UIDocumentInteractionController, didEndSendingToApplication: String?)

Called when a document interaction controller’s document has been handed off to the specified application.

Relationships

Inherits From