I'm looking to leverage either UIDocumentInteractionController
or QLPreviewController
to preview both PDFs and images inside my application. I'm wondering if any of the following customizations are possible (I've scoured the documentation without any luck).
Remove the "Open in..." menu completely (e.g. the user can preview an image but can't export it to a different application)
Have the "Open in..." menu open a file OTHER than the one being previewed (e.g. the preview is of a PDF document but the "Open in..." menu will actually export an ePub file)
UIDocumentInteractionControllerDelegate
has a method documentInteractionController:canPerformAction:
which seems similar to what I'm looking for, but the documentation indicates that copy:
and print:
are the only supported selectors.
(Also, less important, but is it possible to modify the UIModalTransitionStyle
or UIModalPresentationStyle
of either a UIDocumentInteractionController
or a QLPreviewController
? Since QLPreviewController
is a subclass of UIViewController
, I figured I'd be able to set the modalTransitionStyle and modalPresentationStyle properties, but this didn't yield the desired results.)
This has been asked a few times before and it doesn't seem like much customization is allowed. However, it does seem possible to add an extra UIBarButtonItem to a UIDocumentInteractionController (second link below). As for custom transitions, if you've tried modalTransitionStyle and modalPresentation style then I'm going to assume you can't. I can't find any information about it, but I could always be wrong.
Can I hide the Action button on the UIDocumentInteractionController view?
Custom "Email" action in UIDocumentInteractionController
UIDocumentInteractionController adding custom actions to menu (eg email, save to photos)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With