title: Activity indicator not stopping when webview has finished loading
body: <p>Anyone have an idea why my activity indicator is not stopping when the webview has finished loading? Web view is delegated, <code>UIActivityIndicatorView</code> start animating etc, is in my code... ?</p>
  
  <p>This is the relevant code:</p>
  
  <pre><code>import UIKit
  
  class ViewController: UIViewController, UIWebViewDelegate {
  @IBOutlet weak var webview: UIWebView!
  @IBOutlet weak var activity: UIActivityIndicatorView!
  
  var url = "http://apple.com"
  
  func loadURL () {
      let requestURL = NSURL(string: url)
      let request = NSURLRequest(URL: requestURL!)
      webview.loadRequest(request)
  
  }
  
  override func viewDidLoad() {
      super.viewDidLoad()
      loadURL()
      // Do any additional setup after loading the view, typically from a nib.
      webview.delegate = self;
      }
  
  
  func webviewDidStartLoad(_ : UIWebView){
  activity.startAnimating()
  
      NSLog("The webview is starting to load")
      }
  
  func webviewDidFinishLoad(_ : UIWebView){
      activity.stopAnimating()
      activity.hidden=true;
      NSLog("The webview is done loading")
      }
  </code></pre>
  
  <p>Thanks!</p>