title: How do I make a PDFView start at the top of the document?
body: <p>Currently I am using a PDFView in my swift application, however when I instantiate the view controller that uses the PDFView, it always opens the pdf slightly scrolled down. For example:</p>
  <p><a href="https://i.stack.imgur.com/jQQqp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jQQqp.png" alt="enter image description here" /></a>
  <a href="https://i.stack.imgur.com/Egqp7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Egqp7.png" alt="enter image description here" /></a></p>
  <p>The first image is how it opens, and the second image is the way I would like it to open. I can simply scroll up to have it look like the image on the right, however I wanted to know if there was any way of automatically doing it.
  Here is the code I am currently using:</p>
  <pre><code>    override func viewDidLoad() {
          let pdfView = PDFView()
  
          pdfView.translatesAutoresizingMaskIntoConstraints = false
          view.addSubview(pdfView)
  
          pdfView.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor).isActive = true
          pdfView.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor).isActive = true
          pdfView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor).isActive = true
          pdfView.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor).isActive = true
          pdfView.autoScales = true
          pdfView.displayMode = .singlePageContinuous
          pdfView.displayDirection = .vertical
          guard let url = item?.url else {
              return
          }
          
          guard let path = Bundle.main.url(forResource: url, withExtension: &quot;pdf&quot;) else { return }
  
          if let document = PDFDocument(url: path) {
              pdfView.document = document
          }
      }
  </code></pre>