Last Updated: February 25, 2016
·
269
· laphuc

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!