 
     static let lineWidth: CGFloat = 2
 
-    var theBool: Bool = false
+    var isFinished: Bool = false
     var myTimer: Timer = Timer()
     var didFinishTimer: Timer = Timer()
 

    }

    func finishAnimatingProgressBar() {
        self.theBool = true
    }

    func timerCallback() {
        // refer: http://stackoverflow.com/questions/28147096/progressbar-webview-in-swift
        if self.theBool {
            if self.progress >= 1 {
                UIView.animate(withDuration: 0.2, animations: { () -> Void in
                    self.alpha = 0

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

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