     func webView(webView: WKWebView, didFinishNavigation navigation: WKNavigation!) {
         updateViews()
     }
-
 }


    override func viewDidLoad() {
        super.viewDidLoad()
        self.webView = createWebView()
        self.webView!.setTranslatesAutoresizingMaskIntoConstraints(false)
        self.view.insertSubview(self.webView!, atIndex:0)
        self.view.addConstraints([
            NSLayoutConstraint(item: self.webView!,
                attribute: NSLayoutAttribute.Width,
                relatedBy: NSLayoutRelation.Equal,
                toItem: self.view,
                attribute: NSLayoutAttribute.Width,
                multiplier: 1.0,
                constant: 0),
            NSLayoutConstraint(item: self.webView!,
                attribute: NSLayoutAttribute.Height,
                relatedBy: NSLayoutRelation.Equal,
                toItem: self.view,
                attribute: NSLayoutAttribute.Height,
                multiplier: 1.0,
                constant: 0)
            ])
        
        self.webView!.allowsBackForwardNavigationGestures = true
        playlistButton        = UIBarButtonItem(image: UIImage(named: "playlist"),
                                                style: UIBarButtonItemStyle.Plain,
                                               target: self,


    func loadURL(url: NSURL) {
        currentURL = url
        if let _webView = webView {
            _webView.loadRequest(NSURLRequest(URL: url))
        }
    }

