I know that I need to tell my UITextField to resign first responder when I want to dismis the keyboard, but I'm not sure how to know when the user has pressed the "Done" key on the keyboard. Is there a notification I can watch for?
Ios – How to dismiss the keyboard when editing a UITextField
cocoa-touchiosiphoneuikeyboarduitextfield
Related Topic
- Objective-c – How to dismiss keyboard for UITextView with return key
- Ios – How to make a UITextField move up when the keyboard is present – on starting to edit
- Ios – Passing data between view controllers
- IOS – Dismiss keyboard when touching outside of UITextField
- Ios – Super slow lag/delay on initial keyboard animation of UITextField
- Ios – Xcode 6: Keyboard does not show up in simulator
Best Answer
I set the delegate of the
UITextField
to myViewController
class.In that class I implemented this method as following: