1

I am using the "UIPrintInteractionController" for print some documents. Due to security reasons other share options should not be enabled.

But I am getting a share option after zooming the content in "UIPrintInteractionController". Which is shown in the second screenshot below.

Screenshot1

enter image description here

Screenshot2

enter image description here

How to remove the share button as shown in the red box? Please help me.

Thanks In Advance.... :)

arango_86
  • 4,236
  • 4
  • 40
  • 46
  • I'm having the same issue here. Apple does not provide API to access the button, I'm assuming there is no way to do it. By the way, I'm also doing this in Web and I've found the default print dialog in browser also allows user to do so. Different systems seem to share the same principle here, which is if you allow users to print, you are effectively give them the document and, of course, the permission to share it. – Todanley Apr 26 '18 at 00:43

1 Answers1

-1

From the documentation of UIPrintInteractionController, there seems to be no way of hiding the share button. As an hack, you can try this. It works for QLPreviewController.

    override func viewDidLayoutSubviews() {
    navigationItem.rightBarButtonItems?[0] = UIBarButtonItem()
}

Refer this :: How to hide share button in QLPreviewController using swift?

Maulik Bhuptani
  • 597
  • 3
  • 14