MUTextField

@IBDesignable
open class MUTextField : MUNibView

Class that act like UITextField with more customizable options.

  • The object that acts as the delegate of the textfield.

    Declaration

    Swift

    @IBOutlet
    public weak var delegate: MUTextFieldDelegate?
  • The current title that is shown on top of the textfield.

    Declaration

    Swift

    @IBInspectable
    open var title: String { get set }
  • The title’s font.

    Declaration

    Swift

    @objc
    open dynamic var titleFont: UIFont { get set }
  • The title and textfield text horizontal alignment.

    Declaration

    Swift

    @objc
    open dynamic var textAlignment: NSTextAlignment { get set }
  • The textfield’s font.

    Declaration

    Swift

    @objc
    open dynamic var textFieldFont: UIFont { get set }
  • The keyboard style associated with the text object.

    Declaration

    Swift

    @objc
    open dynamic var keyboardType: UIKeyboardType { get set }
  • The appearance style of the keyboard that is associated with the text object.

    Declaration

    Swift

    @objc
    open dynamic var keyboardAppearance: UIKeyboardAppearance { get set }
  • The visible title of the Return key.

    Declaration

    Swift

    @objc
    open dynamic var keyboardReturnKeyType: UIReturnKeyType { get set }
  • A Boolean value indicating whether the Return key is automatically enabled when the user is entering text.

    Declaration

    Swift

    @objc
    open dynamic var keyboardEnablesReturnKeyAutomatically: Bool { get set }
  • The autocorrection style for the text object.

    Declaration

    Swift

    @objc
    open dynamic var keyboardAutocorrectionType: UITextAutocorrectionType { get set }
  • The title’s color.

    Declaration

    Swift

    @IBInspectable
    open dynamic var titleColor: UIColor { get set }
  • The text displayed by the text field.

    Declaration

    Swift

    @IBInspectable
    open var text: String { get set }
  • The string that is displayed when there is no other text in the text field.

    Declaration

    Swift

    @IBInspectable
    open var placeholder: String { get set }
  • The placehodler’s color.

    Declaration

    Swift

    @IBInspectable
    open dynamic var placeholderColor: UIColor { get set }
  • Optional: The IBInspectable version of the title and textfield text horizontal alignment.

    Declaration

    Swift

    @IBInspectable
    open dynamic var textAlignmentInt: Int { get set }
  • The color of the text.

    Declaration

    Swift

    @IBInspectable
    open dynamic var textColor: UIColor { get set }
  • Optional: The IBInspectable version of the return key’s visible title.

    Declaration

    Swift

    @IBInspectable
    open dynamic var keyboardTypeInt: Int { get set }
  • Optional: The IBInspectable version of the keyboard’s appearance style.

    Declaration

    Swift

    @IBInspectable
    open dynamic var keyboardAppearanceInt: Int { get set }
  • Identifies whether the text object should disable text copying and in some cases hide the text being entered.

    Declaration

    Swift

    @IBInspectable
    open dynamic var isSecure: Bool { get set }
  • Identifies whether the text field should respond to user edit.

    Declaration

    Swift

    @IBInspectable
    open dynamic var isEditable: Bool
  • The underline’s height.

    Declaration

    Swift

    @IBInspectable
    open dynamic var underlineHeight: CGFloat { get set }
  • The underline’s color.

    Declaration

    Swift

    @IBInspectable
    open dynamic var underlineColor: UIColor { get set }
  • Activate or deactivate the focus on the textfield. Returns true if succeed.

    Declaration

    Swift

    @discardableResult
    open func activeKeyboard(_ isActive: Bool) -> Bool
  • Default setup to load the view from a xib file.

    Declaration

    Swift

    override open func xibSetup()
  • The natural size for the receiving view, considering only properties of the view itself.

    Declaration

    Swift

    override open var intrinsicContentSize: CGSize { get }
  • Asks the delegate if editing should begin in the specified text field.

    Declaration

    Swift

    public func textFieldShouldBeginEditing(_ textField: UITextField) -> Bool
  • Asks the delegate if the text field should process the pressing of the return button.

    Declaration

    Swift

    public func textFieldShouldReturn(_ textField: UITextField) -> Bool