Hide right button n QLPreviewController?

后端 未结 8 1446
-上瘾入骨i
-上瘾入骨i 2021-01-17 01:35

I am subclassing QLPreviewController in my application and using the following code.

QLPreviewControllerSubClass* preview = [[QLPreviewControllerSubClass all         


        
8条回答
  •  离开以前
    2021-01-17 01:54

    Go for subclassing the QLPreviewController and use the below-mentioned code, that only works fine for me using Xcode 8.3.

    override func viewWillAppear(_ animated: Bool) {
            super.viewWillAppear(animated)
            if let firstView = self.childViewControllers.first    {
                for view in firstView.view.subviews    {
                    if view.isKind(of: UIToolbar.self) {
                        view.removeFromSuperview()
                    }
                }
            }
        }
    

提交回复
热议问题