title: How to disable zoom in and zoom out in pdfView?
body: <p>I want to have just what I receive after</p>
  
  <pre><code> pdfView.autoScales = true
  </code></pre>
  
  <p>without the possibility to change the scale.</p>
  
  <p>After the help of @carmine we have:</p>
  
  <pre><code>import UIKit
  import PDFKit
  
  class ViewController: UIViewController {
  
  @IBOutlet weak var pdfView: PDFView!
  
  override func viewDidLoad() {
      super.viewDidLoad()
  
      setPdfFile()
  }
  
  override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
      super.viewWillTransition(to: size, with: coordinator)
      self.pdfView.autoScales = true
  }
  
  func setPdfFile() {
      if let path = Bundle.main.path(forResource: "Swift.org - Getting Started", ofType: "pdf") {
          let url = URL(fileURLWithPath: path)
          if let pdfDocument = PDFDocument(url: url) {
              pdfView.autoScales = true
              pdfView.displayMode = .singlePageContinuous
              pdfView.displayDirection = .vertical
              pdfView.document = pdfDocument
  
              pdfView.displaysPageBreaks = false
  
              pdfView.minScaleFactor = pdfView.scaleFactor
              pdfView.maxScaleFactor = pdfView.scaleFactorForSizeToFit
              }
          }
      }
  }
  </code></pre>
  
  <p>This gives such a result: <a href="https://gfycat.com/briefpowerlessbug" rel="nofollow noreferrer">https://gfycat.com/briefpowerlessbug</a></p>
  
  <p>But if you run without these lines:</p>
  
  <pre><code>            pdfView.minScaleFactor = pdfView.scaleFactor
              pdfView.maxScaleFactor = pdfView.scaleFactorForSizeToFit
  </code></pre>
  
  <p>You'll receive the result I need but with zooming: <a href="https://gfycat.com/presentconcretebunting" rel="nofollow noreferrer">https://gfycat.com/presentconcretebunting</a></p>
  
  <p>I want to disable zooming and make pdfView's width equal to pdf-file's width. </p>