Clicking in a textfield makes the keyboard appear.
How do I hide it when the user presses the return key?
Ios – How to hide the keyboard when I press return key in a UITextField
cocoa-touchdelegatesiosobjective c
Related Topic
- Ios – Set the maximum character length of a UITextField
- Objective-c – How to dismiss keyboard for UITextView with return key
- Ios – Vertically align text to top within a UILabel
- Ios – How to make a UITextField move up when the keyboard is present – on starting to edit
- Ios – Xcode – How to fix ‘NSUnknownKeyException’, reason: … this class is not key value coding-compliant for the key X” error
- IOS – Dismiss keyboard when touching outside of UITextField
- Ios – how to add an action on UITextField return key
- Ios – How to hide keyboard in swift on pressing return key
Best Answer
First make your file delegate for UITextField
Then add this method to your code.
Also add
self.textField.delegate = self;