Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UITableView reloadData causes UITextField to resignFirstResponder

I have a textField that is set to change the tableView's dataSource with each letter that's entered (and call reloadData).

But for some reason, every time a letter is entered, the keyboard is dismissed.

Anyone know why?

like image 712
Will Larche Avatar asked Jul 07 '12 05:07

Will Larche


1 Answers

Your text field is resigning because reloaded cells are sent a -resignFirstResponder message due to the fact that their survival is not guaranteed after a reload. See this related question for more.

like image 179
CodaFi Avatar answered Nov 02 '22 17:11

CodaFi