title: contentOffset.x doesn't work in viewDidLoad
body: <p>I have horizontal scrolling in a <code>webView</code>. I need that my text in the <code>webView</code> to be shown from the position<code> x = 1000</code>. For this I use the following line:</p>
  <pre><code>self.webView.scrollView.contentOffset.x = 1000
  </code></pre>
  <p>The problem is that this line only works in the <code>scrollViewDidScroll</code> method, and if I use it in method, then after that I cannot scroll my<code> webView</code> because it is always on <code>x = 1000</code></p>
  <p>In <code>viewDidLoad</code> the line does not work. Where I need to write it so that it works at the start of <code>webView</code>, and then I can scroll my webView correctly.</p>
  <p>code:</p>
  <pre><code>import UIKit
  import WebKit
  
  class ViewController: UIViewController, UIScrollViewDelegate {
  
      @IBOutlet weak var webView: WKWebView!
      
      override func viewDidLoad() {
          super.viewDidLoad()
          
          webView?.scrollView.delegate = self
          
          do {
              guard let filePath = Bundle.main.path(forResource: &quot;index&quot;, ofType: &quot;html&quot;)
                  else {
                      print (&quot;File reading error&quot;)
                      return
              }
              
              let headerString = &quot;&lt;meta name=\&quot;viewport\&quot; content=\&quot;initial-scale=1.0\&quot; /&gt;&quot;
              let string =  try String(contentsOfFile: filePath, encoding: .utf8)
              let baseUrl = URL(fileURLWithPath: filePath)
              webView.loadHTMLString(headerString+string, baseURL: baseUrl)
              webView.scrollView.isPagingEnabled = true
              
              self.webView.scrollView.contentOffset.x = 1000
          }
          catch {
              print (&quot;File HTML error&quot;)
          }
      }
  
  }
  </code></pre>
  <p>This line also does not work in <code>viewDidLoad</code></p>
  <pre><code>webView.scrollView.setContentOffset(CGPoint(x: 1000, y: 0), animated: false)
  </code></pre>