Creating Document Interaction Controller Instances
Each document interaction controller is specific to a single document file. This file is typically stored in the user’s Documents folder, represented by the fileURL
in this snippet:
dic = [UIDocumentInteractionController interactionControllerWithURL:fileURL];
You supply a local file URL and present the controller using either the “options” variation (basically the Action menu) or the “Open in...” style. Present the Options menu in one of these two styles from a bar button or an onscreen rectangle:
presentOptionsMenuFromRect:inView:animated:
presentOptionsMenuFromBarButtonItem:animated: ...
Get The Core iOS Developer’s Cookbook, Fifth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.