     let url = NSURL(string: "http://www.starfall.com")!
     webView.loadRequest(NSURLRequest(URL: url))
     webView.allowsBackForwardNavigationGestures = true
+    webView.addObserver(self, forKeyPath: "estimatedProgress", options: .New, context: nil)
     
     navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Open", style: .Plain, target: self, action: "openTapped")
+    progressView = UIProgressView(progressViewStyle: .Default) // or .Bar
+    progressView.sizeToFit()
+    let progressButton = UIBarButtonItem(customView: progressView)
     let spacer = UIBarButtonItem(barButtonSystemItem: .FlexibleSpace, target: nil, action: nil)
     let refresh = UIBarButtonItem(barButtonSystemItem: .Refresh, target: self, action: "refreshTapped")
     
-    toolbarItems = [spacer, refresh]
+    toolbarItems = [progressButton, spacer, refresh]
     navigationController?.toolbarHidden = false
   }
   

class ViewController: UIViewController {
  
  var webView: WKWebView!
  
  override func loadView() {
    webView = WKWebView()

    UIApplication.sharedApplication().networkActivityIndicatorVisible = true
    webView.reload()
  }
  
  override func observeValueForKeyPath(keyPath: String?, ofObject object: AnyObject?, change: [String : AnyObject]?, context: UnsafeMutablePointer<Void>) {
    if keyPath == "estimatedProgress" {
      progressView.progress = Float(webView.estimatedProgress)
    }
  }
}

extension ViewController: WKNavigationDelegate {
