     }
 
     func webView(webView: UIWebView, didFailLoadWithError error: Error) {
-        theBool = true
+        isFinished = true
         webViewLoadsCount = 0
         UIApplication.shared.isNetworkActivityIndicatorVisible = false
     }

        aPath.addLine(to: CGPoint(x: frame.width * CGFloat(progress * 0.9 + 0.1), y: 0))
        aPath.close()

        UIColor.init(colorLiteralRed: 0.4, green: 0.4, blue: 1.0, alpha: 1.0).set()
        aPath.stroke()
        aPath.fill()
    }

    func webViewDidStartLoad(webView: UIWebView) {
        webViewLoadsCount += 1

        UIApplication.shared.isNetworkActivityIndicatorVisible = true
    }

