Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>UPDATE:</strong></p> <p>This no longer works in iOS 6. Quick Look runs in another process using XPC. See [here][3] for more details. I don't foresee any way to customize QLPreviewController. The following answer remains for anyone interested for pre-iOS 6. </p> <hr> <p>If you want to simply remove the action button you need to subclass <code>QLPreviewController</code>. Then in <code>-viewWillAppear:</code> you need to remove the action button by calling <code>[[self navigationItem] setRightBarButtonItem:nil];</code> This will also remove the ability to share files with other apps. If you are fine with that loss, then that's the easiest solution. One thing to be aware of is that <code>QLPreviewController</code> is NOT intended to be customized. You can check out this <a href="https://github.com/rob-brown/RBFilePreviewer" rel="nofollow noreferrer">repository</a> on Github. It contains a QLPreviewController that is already safely subclassed. You just need to add the one line to remove the action button. The repo also has some other conveniences. </p> <p>The better but more complicated solution is to use <code>UIDocumentInteractionController</code>. From what I understand of <code>QLPreviewController</code> is that it's built using <code>UIDocumentInteractionController</code>. <code>QLPreviewController</code> was made for general use and easy addition. <code>UIDocumentInteractionController</code> gives much more control, but is harder to use. I can't sufficiently describe how to use it here. I recommend checking out WWDC 2010 session 106 Understanding Document Interaction Controller. </p> <p>As for disabling cut/copy/paste, you can't do that with <code>QLPreviewController</code>. You might be able to do that with <code>UIDocumentInteractionController</code>, but I wouldn't count on it. Depending on what files you want to display, you may be able to do a completely custom implementation, but that's a lot of work. It's relatively easy to make viewers for plain text, photos, videos, and PDFs. Office documents are more effort than it's worth. </p> <p><strong>EDIT:</strong></p> <p>I've built the ability to remove the action button right into <code>RBFilePreviewer</code> so you don't have to worry about doing it yourself. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload