InsetTextField

@objcMembers open class InsetTextField: UITextField

A subclass of UITextField that allows for setting the padding around the text.

  • The amount of padding that should be added around the text

    Declaration

    Swift

    open var insetPadding = EdgeInsets()
  • Returns the CGRect describing the bounds of the inset text, including padding.

    Declaration

    Swift

    open override func textRect(forBounds bounds: CGRect) -> CGRect

    Return Value

    The CGRect including the padding.

  • Returns the CGRect describing the bounds of the editing text, including padding.

    Declaration

    Swift

    open override func editingRect(forBounds bounds: CGRect) -> CGRect

    Return Value

    The CGRect including the padding.