         return super.becomeFirstResponder()
     }
     
+    open var textInset: CGFloat = 0
+    
+    open override func textRect(forBounds bounds: CGRect) -> CGRect {
+        
+        return bounds.insetBy(dx: textInset, dy: 0)
+    }
+    
+    open override func editingRect(forBounds bounds: CGRect) -> CGRect {
+        return textRect(forBounds: bounds)
+    }
+    
 	/**
      Prepares the view instance when intialized. When subclassing,
      it is recommended to override the prepare method

extension TextField {
    /// Layout the placeholderLabel.
    fileprivate func layoutPlaceholderLabel() {
        let w = leftViewWidth
        let h = 0 == height ? intrinsicContentSize.height : height
        
        placeholderLabel.transform = CGAffineTransform.identity
        
        guard isEditing || !isEmpty || !isPlaceholderAnimated else {
            placeholderLabel.frame = CGRect(x: w, y: 0, width: width - w, height: h)
            return
        }
        
        placeholderLabel.frame = CGRect(x: w, y: 0, width: width - w, height: h)
        placeholderLabel.transform = CGAffineTransform(scaleX: 0.75, y: 0.75)
        
        switch textAlignment {
        case .left, .natural:
            placeholderLabel.x = w
        case .right:
            placeholderLabel.x = width - placeholderLabel.width
        default:break
        }
        

            
            switch s.textAlignment {
            case .left, .natural:
                s.placeholderLabel.x = s.leftViewWidth + s.textInset
            case .right:
                s.placeholderLabel.x = s.width - s.placeholderLabel.width - s.textInset
            default:break
            }
            
