Created
March 13, 2019 03:33
-
-
Save richimf/0024ac452778c001beb65720e9e205fe to your computer and use it in GitHub Desktop.
TextFieldListenToEvents
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private func setup() { | |
self.addTarget(self, action: #selector(beginEditing), for: UIControl.Event.editingDidBegin) | |
self.addTarget(self, action: #selector(textDidChange), for: UIControl.Event.editingChanged) | |
self.addTarget(self, action: #selector(textEndEditing), for: UIControl.Event.editingDidEnd) | |
} | |
@objc func beginEditing() { | |
print(#function) | |
} | |
@objc func textEndEditing() { | |
print(#function) | |
} | |
@objc func textDidChange() { | |
print(#function) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment