         }
     }
     
-    @IBInspectable var dragPointColor: UIColor = UIColor.darkGrayColor() {
-        didSet{
-            setStyle()
-        }
-    }
-    
-    @IBInspectable var buttonColor: UIColor = UIColor.grayColor() {
+    @IBInspectable var dragPointColor: UIColor = UIColor.darkGray {
+        didSet{
+            setStyle()
+        }
+    }
+    
+    @IBInspectable var buttonColor: UIColor = UIColor.gray {
         didSet{
             setStyle()
         }

    
    //lock button animation (SUCCESS)
    func unlock(){
        UIView.transitionWithView(self, duration: 0.2, options: .CurveEaseOut, animations: {
            self.dragPoint.frame = CGRectMake(self.frame.size.width - self.dragPoint.frame.size.width, 0, self.dragPoint.frame.size.width, self.dragPoint.frame.size.height)
        }) { (Status) in
            if Status{
                self.dragPointButtonLabel.text      = self.buttonUnlockedText
                self.imageView.hidden               = true
                self.dragPoint.backgroundColor      = self.buttonUnlockedColor
                self.dragPointButtonLabel.textColor = self.buttonUnlockedTextColor
                self.delegate?.buttonStatus("Unlocked", sender: self)
            }
        }
    }
    
    //reset button animation (RESET)
    func reset(){
        UIView.transitionWithView(self, duration: 0.2, options: .CurveEaseOut, animations: {
            self.dragPoint.frame = CGRectMake(self.dragPointWidth - self.frame.size.width, 0, self.dragPoint.frame.size.width, self.dragPoint.frame.size.height)
        }) { (Status) in
            if Status{
                self.dragPointButtonLabel.text      = self.buttonText
                self.imageView.hidden               = false
                self.dragPoint.backgroundColor      = self.dragPointColor
                self.dragPointButtonLabel.textColor = self.dragPointTextColor
                self.unlocked                       = false

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