make open to override

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2024-07-12 08:36:07 -05:00
parent 1647e44e2f
commit cdede872c0

View File

@ -350,19 +350,19 @@ open class InputField: EntryFieldBase {
} }
extension InputField: UITextFieldDelegate { extension InputField: UITextFieldDelegate {
public func textFieldDidBeginEditing(_ textField: UITextField) { open func textFieldDidBeginEditing(_ textField: UITextField) {
fieldType.handler().textFieldDidBeginEditing(self, textField: textField) fieldType.handler().textFieldDidBeginEditing(self, textField: textField)
updateContainerView() updateContainerView()
updateErrorLabel() updateErrorLabel()
} }
public func textFieldDidEndEditing(_ textField: UITextField) { open func textFieldDidEndEditing(_ textField: UITextField) {
fieldType.handler().textFieldDidEndEditing(self, textField: textField) fieldType.handler().textFieldDidEndEditing(self, textField: textField)
validate() validate()
UIAccessibility.post(notification: .layoutChanged, argument: self.containerView) UIAccessibility.post(notification: .layoutChanged, argument: self.containerView)
} }
public func textFieldDidChangeSelection(_ textField: UITextField) { open func textFieldDidChangeSelection(_ textField: UITextField) {
fieldType.handler().textFieldDidChangeSelection(self, textField: textField) fieldType.handler().textFieldDidChangeSelection(self, textField: textField)
if fieldType.handler().validateOnChange { if fieldType.handler().validateOnChange {
validate() validate()
@ -371,7 +371,7 @@ extension InputField: UITextFieldDelegate {
setNeedsUpdate() setNeedsUpdate()
} }
public func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { open func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
let shouldChange = fieldType.handler().textField(self, textField: textField, shouldChangeCharactersIn: range, replacementString: string) let shouldChange = fieldType.handler().textField(self, textField: textField, shouldChangeCharactersIn: range, replacementString: string)
if shouldChange { if shouldChange {
UIAccessibility.post(notification: .announcement, argument: string) UIAccessibility.post(notification: .announcement, argument: string)