UIDocumentInteractionController
A view controller that previews, opens, or prints files with a file format that your app can’t handle directly.
Declaration
@MainActor class UIDocumentInteractionControllerOverview
Use this class to present an appropriate user interface for previewing, opening, copying, or printing a specified file. For example, an email program might use this class to allow the user to preview attachments and open them in other apps.
After presenting its user interface, a document interaction controller handles all interactions needed to support file preview and menu display.
You can also use the delegate to participate in interactions occurring within the presented interface. For example, the delegate is notified when a file is about to be handed off to another application for opening. For a complete description of the methods you can implement in your delegate, see UIDocumentInteractionControllerDelegate.
Topics
Creating the document interaction controller
Handling document-related interactions
Presenting and dismissing a document preview
Presenting and dismissing menus
presentOptionsMenu(from:in:animated:)presentOptionsMenu(from:animated:)presentOpenInMenu(from:in:animated:)presentOpenInMenu(from:animated:)dismissMenu(animated:)