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

    // MARK: - Overridden methods

    // Insets for the text position.
    override public func editingRectForBounds(bounds: CGRect) -> CGRect {
        return UIEdgeInsetsInsetRect(bounds, UIEdgeInsetsMake(0, marginLeft, 0, marginRight))
    }

    // Insets for the placeholder position.
    override public func textRectForBounds(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 open func resignFirstResponder() -> Bool {
        let resigendFirstResponder = super.resignFirstResponder()

        if resigendFirstResponder {
