TextFieldDelegate
@MainActor
open class TextFieldDelegate : DelegateProxy<UITextFieldDelegate>, UITextFieldDelegate
常用TextField事件代理,可继承
-
是否应该开始编辑,默认nil
Declaration
Swift
@MainActor open var shouldBeginEditing: ((UITextField) -> Bool)?
-
已开始编辑,默认nil
Declaration
Swift
@MainActor open var didBeginEditing: ((UITextField) -> Void)?
-
是否应该结束编辑,默认nil
Declaration
Swift
@MainActor open var shouldEndEditing: ((UITextField) -> Bool)?
-
已结束编辑,默认nil
Declaration
Swift
@MainActor open var didEndEditing: ((UITextField) -> Void)?
-
是否应该改变字符,默认nil
Declaration
Swift
@MainActor open var shouldChangeCharacters: ((UITextField, NSRange, String) -> Bool)?
-
选中已改变,仅iOS13+支持,默认nil
Declaration
Swift
@MainActor open var didChangeSelection: ((UITextField) -> Void)?
-
是否应该清除,默认nil
Declaration
Swift
@MainActor open var shouldClear: ((UITextField) -> Bool)?
-
是否应该回车,默认nil
Declaration
Swift
@MainActor open var shouldReturn: ((UITextField) -> Bool)?
-
初始化并绑定textField
Declaration
Swift
@MainActor public convenience init(textField: UITextField)
-
Undocumented
Declaration
Swift
@MainActor open func textFieldShouldBeginEditing(_ textField: UITextField) -> Bool
-
Undocumented
Declaration
Swift
@MainActor open func textFieldDidBeginEditing(_ textField: UITextField)
-
Undocumented
Declaration
Swift
@MainActor open func textFieldShouldEndEditing(_ textField: UITextField) -> Bool
-
Undocumented
Declaration
Swift
@MainActor open func textFieldDidEndEditing(_ textField: UITextField)
-
Undocumented
Declaration
Swift
@MainActor open func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool
-
Undocumented
Declaration
Swift
@MainActor open func textFieldDidChangeSelection(_ textField: UITextField)
-
Undocumented
Declaration
Swift
@MainActor open func textFieldShouldClear(_ textField: UITextField) -> Bool
-
Undocumented
Declaration
Swift
@MainActor open func textFieldShouldReturn(_ textField: UITextField) -> Bool