How to hide share/action button from QLPreviewController in iOS 10.X

In iOS 10.x, app is showing PDF in QLPReviewController. In bottom tollbar share/action button is displayed. I am not able to hide/remove this button. Please help.

How this question is still without an answer? Does that mean there isn't any way we can hide or remove those action buttons?

The best I managed with it being presented full screen is to set the right navigation item to be a close button and set the navigation controller toolbar as hidden in viewDidLoad. This leaves a blank toolbar, but that at least gets rid of the share button. Looking at the screen using xcode's view inspector, it looks like it might be creating a toolbar since I see two toolbars stacked on one another, a blank one and the one with the share button. I also set the toolbar to hidden in willLayoutSubviews That works on a compact screen, aka portrait on a phone, but in landscape the share button becomes a second button to the left of my close button. I just spotted the landscape issue and am still looking into it.

One additional horrible hack is to check the right bar button items list to see if it has more items than you expect, and if so, drop the first one. In my case I was expecting one, so I set it to be just the last item in the list. I have the advantage of not needing my app to go to the store, so I don't know if this combination of things would be allowed in store apps.

How to hide share/action button from QLPreviewController in iOS 10.X
 
 
Q