I have a UITableView
containing in each cell a UITextField
. When the user clicks on the UITextField
, as expected, the keyboard will popup.
I have implemented in my delegate tableView: didSelectRowAtIndexPath:
method to dismiss the keyboard with resignFirstResponder
sent to the last UITextField
used.
Everything works ok if the cell with the last UITextField
used is displayed.
Now, if I scroll down to bottom of the tableview and press on a row, then the resignFirstResponder
is sent to a hidden UITextField
and will not hide the keyboard. It doesn't throw an error also.
How can I hide the keyboard in such cases?