将PDF
加载到QLPreviewController
中时,它不适合我内部的内容,我将其作为子视图添加到容器视图中。 PDF
的缩放比要求的更大。有什么方法可以修改QLPreview
的缩放比例?
let preview = QLPreviewController()
preview.dataSource = self
preview.navigationController?.isNavigationBarHidden = true
addChild(preview)
termsConditionsContainer.addSubview(preview.view)
termsConditionsContainer.backgroundColor = .white
preview.view.translatesAutoresizingMaskIntoConstraints = false
preview.view.topAnchor.constraint(equalTo: termsConditionsContainer.topAnchor).isActive = true
preview.view.leftAnchor.constraint(equalTo: self.termsConditionsContainer.leftAnchor).isActive = true
preview.view.widthAnchor.constraint(equalTo: self.termsConditionsContainer.widthAnchor).isActive = true
preview.view.bottomAnchor.constraint(equalTo: termsConditionsContainer.bottomAnchor).isActive = true
preview.didMove(toParent: self)