mendirattanishant / PreviewControllerHideBottomButtons

Remove UIToolbar buttons on QLPreviewController

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PreviewControllerHideBottomButtons

###Description Repo demonstrates how to remove UIToolbar buttons on QLPreviewController.


###Steps:

  1. Subclass UIToolbar
  2. Create UINavigationController using init(navigationBarClass:toolbarClass:) and supply UIToolbar subsclass created in step 1 for toolbarClass
  3. Inside of UIToolbar 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.

--


Clone and run example to see it in action.

About

Remove UIToolbar buttons on QLPreviewController

License:MIT License


Languages

Language:Swift 100.0%