         
         self.drawLine()
         
-        NSNotificationCenter.defaultCenter().addObserver(self, selector: "didBeginChangeText", name: UITextFieldTextDidBeginEditingNotification, object: self)
-        NSNotificationCenter.defaultCenter().addObserver(self, selector: "didChangeText", name: UITextFieldTextDidChangeNotification, object: self)
-        NSNotificationCenter.defaultCenter().addObserver(self, selector: "didEndChangeText", name: UITextFieldTextDidEndEditingNotification, object: self)
+        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AwesomeTextField.didBeginChangeText), name: UITextFieldTextDidBeginEditingNotification, object: self)
+        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AwesomeTextField.didChangeText), name: UITextFieldTextDidChangeNotification, object: self)
+        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AwesomeTextField.didEndChangeText), name: UITextFieldTextDidEndEditingNotification, object: self)
         
     }
     
     func drawLine() {
         
-        var underLine = UIView(frame:CGRectMake(0, self.frame.size.height - self.underLineWidth, self.frame.size.width, self.underLineWidth))
+        let underLine = UIView(frame:CGRectMake(0, self.frame.size.height - self.underLineWidth, self.frame.size.width, self.underLineWidth))
         
         underLine.backgroundColor = self.underLineColor
         underLine.alpha = self.underLineAlpha

    
    func didEndChangeText() {
        
        if self.isLifted && self.text.isEmpty {
            UIView.animateWithDuration(self.animationDuration, animations: { () -> Void in
                
                self.placeholderLabel.alpha = self.placeholderAlphaBefore

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