     // MARK: - Overridden methods
 
     // Insets for the text position.
-    override public func editingRectForBounds(bounds: CGRect) -> CGRect {
+    override open func editingRect(forBounds bounds: CGRect) -> CGRect {
         return UIEdgeInsetsInsetRect(bounds, UIEdgeInsetsMake(0, marginLeft, 0, marginRight))
     }
 
     // Insets for the placeholder position.
-    override public func textRectForBounds(bounds: CGRect) -> CGRect {
+    override open func textRect(forBounds bounds: CGRect) -> CGRect {
         return UIEdgeInsetsInsetRect(bounds, UIEdgeInsetsMake(0, marginLeft, 0, marginRight))
     }
 

     * Restores the placeholder text to its original value, before it was removed when text field became
     * first responder.
     */
    override public func resignFirstResponder() -> Bool {
        let resigendFirstResponder = super.resignFirstResponder()

        if resigendFirstResponder {

    }

    /// The text's margin right.
    @IBInspectable open var marginRight: CGFloat {
        get {
            if defaultMode && self.clearButtonMode != .never {
                return 24.0
            } else {
                return textMarginRight
