Hide SoftKeyboard when view disappear
If you want to hide soft keyboard but don't know exactly which UITextField to call [UITextField resignFirstResponder]. Just do the simple way:
- At UIViewController, override method viewWillDisappear
- Add one line of code: [self.view endEditing:YES];
That's all!
Written by La Le Phuc
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ios
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#