title: Detection of WebView load finish
body: <p>I am creating a simple app with a WebView basing on <a href="https://www.veasoftware.com/tutorials/2015/4/16/web-view-with-loading-indicator-in-swift-xcode-63-os-x-1010-tutorial" rel="nofollow">this tutorial</a>. </p>
  
  <p>I would like to display a progress indicator while loading the page, but the methods <code>didStartProvisionalLoadForFrame</code> and <code>didFinishLoadForFrame</code> are never called. What am I doing wrong?</p>
  
  <p><strong>ViewController.swift</strong></p>
  
  <pre><code>import Cocoa
  import WebKit
  
  class ViewController: NSViewController {
  
  
      @IBOutlet weak var webView: WebView!
      @IBOutlet weak var webViewProgressIndicator: NSProgressIndicator!
      let messengerUrl = "https://www.messenger.com/"
  
      override func viewDidLoad() {
          super.viewDidLoad()
          self.webView.mainFrame.loadRequest(NSURLRequest(URL: NSURL(string: messengerUrl)!))
      }
  
      override var representedObject: AnyObject? {
          didSet {
          // Update the view, if already loaded.
          }
      }
  
      func webView(sender: WebView!, didStartProvisionalLoadForFrame frame: WebFrame!)
      {
          self.webViewProgressIndicator.startAnimation(self)
      }
  
      func webView(sender: WebView!, didFinishLoadForFrame frame: WebFrame!)
      {
          self.webViewProgressIndicator.stopAnimation(self)
      }
  }
  </code></pre>
  
  <p>I am using Xcode 7 Beta and OS X 10.11 Beta.</p>