TextViewDelegate

@MainActor
open class TextViewDelegate : DelegateProxy<UITextViewDelegate>, UITextViewDelegate

常用TextView事件代理,可继承

  • 是否应该开始编辑,默认nil

    Declaration

    Swift

    @MainActor
    open var shouldBeginEditing: ((UITextView) -> Bool)?
  • 已开始编辑,默认nil

    Declaration

    Swift

    @MainActor
    open var didBeginEditing: ((UITextView) -> Void)?
  • 是否应该结束编辑,默认nil

    Declaration

    Swift

    @MainActor
    open var shouldEndEditing: ((UITextView) -> Bool)?
  • 已结束编辑,默认nil

    Declaration

    Swift

    @MainActor
    open var didEndEditing: ((UITextView) -> Void)?
  • 是否应该改变文本,默认nil

    Declaration

    Swift

    @MainActor
    open var shouldChangeText: ((UITextView, NSRange, String) -> Bool)?
  • 文本已改变,默认nil

    Declaration

    Swift

    @MainActor
    open var didChange: ((UITextView) -> Void)?
  • 选中已改变,默认nil

    Declaration

    Swift

    @MainActor
    open var didChangeSelection: ((UITextView) -> Void)?

Lifecycle

  • 初始化并绑定textView

    Declaration

    Swift

    @MainActor
    public convenience init(textView: UITextView)

UITextViewDelegate