         }
         return true
     }
+    
+    public func textFieldShouldClear(textField: UITextField) -> Bool {
+        if let delegate = self.delegate {
+            if let result = delegate.watermarkedTextFieldShouldClear?(self) {
+                return result
+            }
+        }
+        return true
+    }
+    
+    // MARK: TextField target actions
 
     internal func textFieldChanged(textfield: UITextField) {
         self.setText(textField.text, animated: true)

        }
        return nil
    }
}


    }
    
    // MARK: - Textfield delegate methods
    
    public func textFieldShouldBeginEditing(textField: UITextField) -> Bool {
        if let delegate = self.delegate {
            if let result = delegate.watermarkedTextFieldShouldBeginEditing?(self) {
                return result
            }
        }
        return true
    }
    
    public func textFieldDidBeginEditing(textField: UITextField) {
        self.updateControl(true)
        if let delegate = self.delegate {
            delegate.watermarkedTextFieldDidBeginEditing?(self)
        }
    }
    
    public func textFieldShouldEndEditing(textField: UITextField) -> Bool {
        if let delegate = self.delegate {
            if let result = delegate.watermarkedTextFieldShouldEndEditing?(self) {
                return result
            }
        }
        return true
    }
    
    public func textField(textField: UITextField, shouldChangeCharactersInRange range: NSRange, replacementString string: String) -> Bool {
        if let delegate = self.delegate {
            if let result = delegate.watermarkedTextField?(self, shouldChangeCharactersInRange: range, replacementString: string) {
                return result
            }
        }
        return true
    }
    
    public func textFieldDidEndEditing(textField: UITextField) {
        self.updateControl(true)
        if let delegate = self.delegate {
