After viewing different options on the Internet, I never found a working implementation option how to do it. I just want to add listener to UITextField. Have some code
class RegisterViewController: UIViewController, UITextFieldDelegate
@IBOutlet weak var textRegion: UITextField!
textRegion.addTarget(self, action: Selector(("myTargetFunction:")), for: UIControlEvents.touchDown)
func myTargetFunction() {
print("It works!")
}
but it does not work, have THREAD 1 : SIGNAL SIGABRT