UnderlinedTextView

open class UnderlinedTextView : InnerDesignableView, ResetableField, RespondableField
extension UnderlinedTextView: GuidedTextField
extension UnderlinedTextView: UITextViewDelegate

Class for custom textView. Contains UITextView, top floating placeholder, underline line under textView and bottom label with some info. Also have button for text clear, but you can hide it. Standart height equals 77.

Open Properties

  • Undocumented

    Declaration

    Swift

    open var maxLength: Int?

Public Properties

Events

  • Undocumented

    Declaration

    Swift

    public var onBeginEditing: ((UnderlinedTextView) -> Void)?
  • Undocumented

    Declaration

    Swift

    public var onEndEditing: ((UnderlinedTextView) -> Void)?
  • Undocumented

    Declaration

    Swift

    public var onTextChanged: ((UnderlinedTextView) -> Void)?
  • Undocumented

    Declaration

    Swift

    public var onShouldReturn: ((UnderlinedTextView) -> Void)?
  • Undocumented

    Declaration

    Swift

    public var onValidateFail: ((UnderlinedTextView) -> Void)?
  • Undocumented

    Declaration

    Swift

    public var onHeightChanged: ((CGFloat) -> Void)?
  • Undocumented

    Declaration

    Swift

    public var onContainerStateChanged: ((FieldContainerState) -> Void)?

Initialization

  • Undocumented

    Declaration

    Swift

    override public init(frame: CGRect)
  • Undocumented

    Declaration

    Swift

    required public init?(coder aDecoder: NSCoder)

UIView

  • Undocumented

    Declaration

    Swift

    override open func awakeFromNib()
  • Undocumented

    Declaration

    Swift

    override open func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?)
  • Undocumented

    Declaration

    Swift

    override open func draw(_ rect: CGRect)
  • Undocumented

    Declaration

    Swift

    override open var intrinsicContentSize: CGSize { get }

RespondableField

  • Declaration

    Swift

    public var nextInput: UIResponder? { get set }
  • Declaration

    Swift

    public var previousInput: UIResponder? { get set }
  • Declaration

    Swift

    open override var isFirstResponder: Bool { get }
  • Declaration

    Swift

    open override func becomeFirstResponder() -> Bool
  • Declaration

    Swift

    open override var canBecomeFirstResponder: Bool { get }

Public Methods

  • Allows you to change placeholder services for text view

    Declaration

    Swift

    public func setup(placeholderServices: [AbstractPlaceholderService])
  • Allows you to add new placeholder service

    Declaration

    Swift

    public func add(placeholderService service: AbstractPlaceholderService)
  • Allows you to change default hint service

    Declaration

    Swift

    public func setup(hintService: AbstractHintService)
  • Allows you to set some string as hint message

    Declaration

    Swift

    public func setup(hint: String)
  • Allows you to refresh set of states, when hint message or error message should be visible

    Declaration

    Swift

    public func setup(visibleHintStates: HintVisibleStates)
  • Allows you to set optional string as text. Also you can disable automatic validation on this action.

    Declaration

    Swift

    public func setup(text: String?, animated: Bool = true, validateText: Bool = true)
  • Allows you to disable one or more edit actions By default all actions are enabled Set .all to disable all actions Set nil to enable all actions after the disable has been applied

    Declaration

    Swift

    public func disable(editActions: [StandardEditActions]?)
  • Allows to set accessibilityIdentifier for textView and its internal elements

    Declaration

    Swift

    public func setTextFieldIdentifier(_ identifier: String)
  • Allows to set view in ‘error’ state, optionally allows you to set the error message. If errorMessage is nil - label keeps the previous info message

    Declaration

    Swift

    public func setError(with errorMessage: String?, animated: Bool)
  • Method performs validate logic, updates all UI elements and returns you isValid value

    Declaration

    Swift

    @discardableResult
    public func validate(force: Bool = false) -> Bool
  • Clear text, reset error and update all UI elements - reset to default state

    Declaration

    Swift

    public func reset(animated: Bool)
  • Reset only error state and update all UI elements

    Declaration

    Swift

    public func resetErrorState(animated: Bool = true)
  • Allows you to change base height for view (inner property with last value of height), recommend to call before working with field

    Declaration

    Swift

    public func updateBaseHeight(_ height: CGFloat)

GuidedTextField

UITextViewDelegate