How can I override the addTarget function inside the UITextField class, but only for UIControlEvent.allEditingEvents?
The function is like this, however I am not sure how to apply it only for a specific control event.
override func addTarget(_ target: Any?, action: Selector, for controlEvents: UIControlEvents) {
<#code#>
}
You should call
super.addTargetand only call your custom code ifcontrolEventsequals to.allEditingEvents.