Skip to content

Latest commit

 

History

History
51 lines (33 loc) · 1.09 KB

TextField.md

File metadata and controls

51 lines (33 loc) · 1.09 KB

TextField

@available(iOS 9.0, *) public class TextField: UITextField

Inheritance

UITextField, UITextFieldDelegate

Nested Type Aliases

WillValueChangeHandler

public typealias WillValueChangeHandler = (_ sender: UITextField, _ newValue: String, _ input: String) -> Bool

DidValueChangeHandler

public typealias DidValueChangeHandler = (String) -> Void

Initializers

init(value:placeholder:keyboardType:)

public init(value: String, placeholder: String, keyboardType type: UIKeyboardType)

Methods

willInputUpdateHandler(_:)

@discardableResult public func willInputUpdateHandler(_ willInputUpdateHandler: @escaping WillValueChangeHandler) -> Self

inputHandler(_:)

@discardableResult public func inputHandler(_ inputHandler: @escaping DidValueChangeHandler) -> Self

textField(_:shouldChangeCharactersIn:replacementString:)

public func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool