Search code examples
iosuiviewcontrolleruidocumentinteraction

UIDocumentInteractionController change title of presented view


I am using the UIDocumentInteractionController to display PDF files. My files are stored in the filesystem using encoded filenames that are not user-friendly. I do have access to a more friendly name for the file, but the file is not stored with this name (for uniqueness reasons).

When I load the document into the UIDocumentInteractionController then the view displays the unfriendly 'real' filename in the title bar.

Is there any way to change the displayed title as presented by the UIDocumentInteractionController?


Solution

  • UIDocumentInteractionController has a name property which you can set to your user-friendly name. That name will be used in the title bar of the presented document.