I have integrated QLPreviewController and UIDocumentInteractionController in my app, and it is working fine.
The only problem is- I want to configure the bottom toolbar, I want to remove the default toolbar items, which appear as shown in image below:
Is there any way to do so, please suggest.
Short Answer: NO, Not in IOS6+
Description:
One thing to note about QLPreviewController is that it's not meant to be customized. There were other libraries allowing you to change the functionality such as:
https://github.com/rob-brown/RBFilePreviewer
Which are not working in iOS 6+ since apple made a big change in QLPreviewController and it's technically running in a separate process. Although it might be possible (not sure) using private apis but your app will be rejected then.
You can find more info about this change here: http://oleb.net/blog/2012/10/remote-view-controllers-in-ios-6/
Hope this helps
UINavigationController
using
init(navigationBarClass:toolbarClass:) and supply UIToolbar subsclass
created in step 1 for toolbarClass
QLPreviewController
instance and push onto UINavigationController stackUIToolbar subsclass
override
setItems(_:animated:). To remove all buttons call super with empty array super.setItems([], animated: false)
or potentially you can add only buttons you want to keep. UINavigationController
created in step 2Here is the example PreviewControllerHideBottomButtons
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