How to handle when Share button tapped on the QLPreviewController

Viewed 50

I implemented QLPreviewController in project, it works fine. But I want to know when Share button was tapped. How can I do it? Also I want to know when UIActivityIndicator was dismissed. In other VC I use custom Share buttons and I don't have any problems with it. My code:

class MyViewcontroller: UIViewController {

func showPreview() {
   let quickLookViewController = QLPreviewController()
   quickLookViewController.dataSource = self
   quickLookViewController.delegate = self
   quickLookViewController.currentPreviewItemIndex = indexPath.row
   present(quickLookViewController, animated: true)}
}

class MyPreviewViewController: QLPreviewController {
   ...
}

extension MyPreviewViewController: QLPreviewControllerDataSource {
   ...
}

extension MyPreviewViewController: QLPreviewControllerDelegate {
   ...
}
0 Answers
Related