iOS Guides | Samples

UIKit.UIDocumentInteractionController Class

Supports displaying, preview and opening files stored on the device.

See Also: UIDocumentInteractionController


[Foundation.Register("UIDocumentInteractionController", true)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.TvOS, ObjCRuntime.PlatformArchitecture.All, null)]
public class UIDocumentInteractionController : NSObject


Application developers can use this class to display and interact with files on the device. Types of interaction include, e.g., previewing, printing, opening, and copying files.

Related content


Namespace: UIKit
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions:

The members of UIKit.UIDocumentInteractionController are listed below.

See Also: NSObject

Public Constructors

Default constructor that initializes a new instance of this class with no parameters.

Protected Constructors

Constructor to call on derived classes to skip initialization and merely allocate the object.
A constructor used when creating managed representations of unmanaged objects; Called by the runtime.

Public Properties

AnnotationNSObject. Used to pass custom property-list information to the application that will open the document.
CanPerformActionUIDocumentInteractionProbe. Delegate invoked by the object to get a value.
ClassHandleIntPtr. The handle for this class.
DelegateIUIDocumentInteractionControllerDelegate. An instance of the UIKit.IUIDocumentInteractionControllerDelegate model class which acts as the class delegate.
GestureRecognizersUIGestureRecognizer[]. The system-provided gesture recognizers for presenting a UIDocumentInteractionController.
IconsUIImage[]. The images associated with the target file. Read-only.
NameString. The name of the target file.
PerformActionUIDocumentInteractionProbe. Delegate invoked by the object to get a value.
RectangleForPreviewUIDocumentInteractionRectangle. Delegate invoked by the object to get a value.
UrlNSUrl. The URL of the target file on the local filesystem.
UtiString. The Uniform Type Identifier of the target file.
ViewControllerForPreviewUIDocumentViewController. Delegate invoked by the object to get a value.
ViewForPreviewUIDocumentViewForPreview. Delegate invoked by the object to get a value.
WeakDelegateNSObject. An object that can respond to the delegate protocol for this type

Public Methods

Dismisses the active menu.
Dismisses the active document preview.
FromUrl(NSUrl) : UIDocumentInteractionController
Creates a new UIDocumentInteractonController initialized with the specified URL.
PresentOpenInMenu(UIBarButtonItem, Boolean) : Boolean
Presents a menu for opening a document and anchors that menu to the specified UIBarButtonItem.
PresentOpenInMenu(CGRect, UIView, Boolean) : Boolean
Displays a menu for opening the document.
PresentOptionsMenu(UIBarButtonItem, Boolean) : Boolean
Presents an options menu and anchors it to the specified UIBarButtonItem.
PresentOptionsMenu(CGRect, UIView, Boolean) : Boolean
Presents an options menu.
PresentPreview(Boolean) : Boolean
Displays a full-screen preview of the target document.

Protected Methods

Releases the resources used by the UIDocumentInteractionController object.

Public Events

DidDismissOpenInMenuEvent raised by the object.
DidDismissOptionsMenuEvent raised by the object.
DidEndPreviewEvent raised by the object.
DidEndSendingToApplicationEvent raised by the object.
WillBeginPreviewEvent raised by the object.
WillBeginSendingToApplicationEvent raised by the object.
WillPresentOpenInMenuEvent raised by the object.
WillPresentOptionsMenuEvent raised by the object.