I have done code like this but it's open QLPreviewController but Share button was not disabled. I have tried different things but it's not worked.
- Or You Can Suggest me any different Preview Controller in which i can Disable Share button.
qlViewController = QLPreviewController()
qlViewController.navigationItem.rightBarButtonItem = nil
- qlViewController.delegate = self
- qlViewController.dataSource = self
func numberOfPreviewItemsInPreviewController(controller: QLPreviewController) -> Int { return 1 }
func previewController(controller: QLPreviewController, previewItemAtIndex index: Int) -> QLPreviewItem {
controller.navigationItem.rightBarButtonItem = nil
return fileUrlToOpen
}