How to build a tableview that takes keyboard input and displays an autocomplete list
This is a companion demo to the blog post: http://eskimona.com/objective-c/2015/03/28/autocomplete-tableview.html
and demonstrates that reloadData
will ask the cells and their UIResponders to resign first responder.
If you subclass the related responder (in this case a UITextField) to override resignFirstResponder
, the necessary
tableview under the hood methods will not get called and reloadData
will not behave as expected.
There are three stages to this demo project.
Expected behavior: user types a character into the textfield, related alphabetimal cells are loaded but the keyboard will be dismissed without updating the character in the textfield
resignFirstResponder
.