             })
         } else {
             UIView.animateWithDuration(self.animationDuration, animations: { () -> Void in
-                self.underlineView.alpha = self.underLineAlpha
+                self.underlineView.alpha = self.underLineAlphaBefore
             })
         }
         

            })
        } else {
            UIView.animateWithDuration(self.animationDuration, animations: { () -> Void in
                self.underlineView.alpha = 1.0
            })
        }
        

    
    @IBInspectable var underLineWidth : CGFloat = 2.0
    @IBInspectable var underLineColor : UIColor = UIColor.blackColor()
    @IBInspectable var underLineAlphaBefore : CGFloat = 0.5
    @IBInspectable var underLineAlphaAfter : CGFloat = 1
    
    @IBInspectable var placeholderTextColor : UIColor = UIColor.grayColor()
    
