Skip to content

Instantly share code, notes, and snippets.

@mitulmanish
Created July 6, 2016 14:07
Show Gist options
  • Save mitulmanish/c7848c887cb23b8d8f2e7770557a262e to your computer and use it in GitHub Desktop.
Save mitulmanish/c7848c887cb23b8d8f2e7770557a262e to your computer and use it in GitHub Desktop.
UITextFieldDelegate Methods
Editing lifecycle methods:
textFieldShouldBeginEditing(_:)
textFieldDidBeginEditing(_:)
textFieldShouldEndEditing(_:)
textFieldDidEndEditing(_:)
The primary method for controlling text:
textField(_:shouldChangeCharactersInRange:replacementString:)
The clear button (the ‘x’ on the right side of some text fields):
textFieldShouldClear(_:)
The return key in the keyboard:
textFieldShouldReturn(_:)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment