         }
     }
     
-    @IBInspectable var buttonTextColor: UIColor = UIColor.whiteColor() {
-        didSet{
-            setStyle()
-        }
-    }
-    
-    @IBInspectable var dragPointTextColor: UIColor = UIColor.whiteColor() {
-        didSet{
-            setStyle()
-        }
-    }
-    
-    @IBInspectable var buttonUnlockedTextColor: UIColor = UIColor.whiteColor() {
+    @IBInspectable var buttonTextColor: UIColor = UIColor.white {
+        didSet{
+            setStyle()
+        }
+    }
+    
+    @IBInspectable var dragPointTextColor: UIColor = UIColor.white {
+        didSet{
+            setStyle()
+        }
+    }
+    
+    @IBInspectable var buttonUnlockedTextColor: UIColor = UIColor.white {
         didSet{
             setStyle()
         }

        self.layer.masksToBounds = true
        
        // start detecting pan gesture
        let panGestureRecognizer                    = UIPanGestureRecognizer(target: self, action: #selector(self.panDetected(_:)))
        panGestureRecognizer.minimumNumberOfTouches = 1
        self.dragPoint.addGestureRecognizer(panGestureRecognizer)
    }
    
    func panDetected(sender: UIPanGestureRecognizer){
        var translatedPoint = sender.translationInView(self)
        translatedPoint     = CGPointMake(translatedPoint.x   , self.frame.size.height / 2)
        sender.view?.frame.origin.x = (dragPointWidth - self.frame.size.width) + translatedPoint.x
        if sender.state == .Ended{
            
            let velocityX = sender.velocityInView(self).x * 0.2
            var finalX    = translatedPoint.x + velocityX
            if finalX < 0{
                finalX = 0

    }
    
    @IBInspectable var buttonUnlockedText: String   = "UNLOCKED"
    @IBInspectable var buttonUnlockedColor: UIColor = UIColor.black
    var buttonFont                                  = UIFont.boldSystemFont(ofSize: 17)
    
    
    var dragPoint            = UIView()
