Protocol: UIDocumentInteractionControllerDelegate
Overview
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.Called when a document interaction controller’s document has been handed off to the specified application.Called when a document interaction controller’s document is about to be opened by the specified application.Called when a document interaction controller has dismissed its Open In menu.Called when a document interaction controller has dismissed its options menu.Called when a document interaction controller has dismissed its document preview.Called when a document interaction controller needs the rectangle to use as the starting point for animating the display of a document preview.Called when a document interaction controller needs a view controller for presenting a document preview.Called when a document interaction controller needs the starting point for animating the display of a document preview.Called when a document interaction controller is about to display a preview for its document.Called when a document interaction controller is about to display an Open In menu.Called when a document interaction controller is about to display an options menu.
Instance Method Summary (collapse)
-
- documentInteractionController:
Called when a document interaction controller’s document is about to be opened by the specified application.
-
- documentInteractionControllerDidDismissOpenInMenu:
Called when a document interaction controller has dismissed its Open In menu.
-
- documentInteractionControllerDidDismissOptionsMenu:
Called when a document interaction controller has dismissed its options menu.
-
- documentInteractionControllerDidEndPreview:
Called when a document interaction controller has dismissed its document preview.
-
- documentInteractionControllerRectForPreview:
Called when a document interaction controller needs the rectangle to use as the starting point for animating the display of a document preview.
-
- documentInteractionControllerViewControllerForPreview:
Called when a document interaction controller needs a view controller for presenting a document preview.
-
- documentInteractionControllerViewForPreview:
Called when a document interaction controller needs the starting point for animating the display of a document preview.
-
- documentInteractionControllerWillBeginPreview:
Called when a document interaction controller is about to display a preview for its document.
-
- documentInteractionControllerWillPresentOpenInMenu:
Called when a document interaction controller is about to display an Open In menu.
-
- documentInteractionControllerWillPresentOptionsMenu:
Called when a document interaction controller is about to display an options menu.
Instance Method Details
- (Object) documentInteractionController(controller, willBeginSendingToApplication, application)
Called when a document interaction controller’s document is about to be opened by the specified application. This method is called when the user chooses to open a document, which could occur from within a document preview. When a document is passed to another application, the contents of the document interaction controller’s annotation property are passed with it. You can use this method to configure the contents of that property or prepare your own application for handing off the document.
- (Object) documentInteractionControllerDidDismissOpenInMenu(controller)
Called when a document interaction controller has dismissed its Open In menu. You can use this method to remove any additional views or content you placed underneath the Open In menu in your documentInteractionControllerWillPresentOpenInMenu: method.
- (Object) documentInteractionControllerDidDismissOptionsMenu(controller)
Called when a document interaction controller has dismissed its options menu. You can use this method to remove any additional views or content you placed underneath the options menu in your documentInteractionControllerWillPresentOptionsMenu: method.
- (Object) documentInteractionControllerDidEndPreview(controller)
Called when a document interaction controller has dismissed its document preview. This method is called after the view containing the document preview has been removed from the application’s key window. You can use this notification to remove any interface elements you set up behind the preview elements.
- (CGRect) documentInteractionControllerRectForPreview(controller)
Called when a document interaction controller needs the rectangle to use as the starting point for animating the display of a document preview. If you do not implement the documentInteractionControllerViewForPreview: method, or if you do implement it but return a nil value, this method is not called. If you do not implement this method, the starting rectangle is assumed to be the bounds of the view returned by the documentInteractionControllerViewForPreview: method.
- (UIViewController) documentInteractionControllerViewControllerForPreview(controller)
Called when a document interaction controller needs a view controller for presenting a document preview. Although technically optional, this method is required if your application attempts to display a preview for a document. The view controller returned by this method is used as the parent for the document preview.If you return a navigation controller from this method, the document interaction controller is pushed onto the navigation stack using the standard navigation controller animations. If you return any other type of view controller, the document interaction controller is displayed modally, in which case, the view controller you return must be capable of presenting a modal view controller.
- (UIView) documentInteractionControllerViewForPreview(controller)
Called when a document interaction controller needs the starting point for animating the display of a document preview. By default, the starting rectangle for the animation is set to the bounds of the returned view. To specify a different starting rectangle, you must also override the documentInteractionControllerRectForPreview: method.
- (Object) documentInteractionControllerWillBeginPreview(controller)
Called when a document interaction controller is about to display a preview for its document. This method is called shortly before the view containing the document preview is presented modally. You can use this notification to set up any additional interface elements behind the preview elements.
- (Object) documentInteractionControllerWillPresentOpenInMenu(controller)
Called when a document interaction controller is about to display an Open In menu. The Open In menu is used to select an application for opening the current file. You can use this method to update your user interface in response to displaying the menu.
- (Object) documentInteractionControllerWillPresentOptionsMenu(controller)
Called when a document interaction controller is about to display an options menu. The options menu is used to present the user with options for previewing the document, opening it in an application, or copying its contents. You can use this method to update your user interface in response to displaying the menu.