开发者

Matching text in UITextField to a list in UITableView

开发者 https://www.devze.com 2023-03-05 16:12 出处:网络
In my app I have a text box, a table view, and a database. I want 开发者_如何学编程to make it so that when I click on the text box and write something in it, my table view will display the list of wor

In my app I have a text box, a table view, and a database. I want 开发者_如何学编程to make it so that when I click on the text box and write something in it, my table view will display the list of words similar or identical to the word or words I have entered into the text field. Please, can anyone provide me a suitable idea for implementing this? Thanks.


Whenever you edit text field, the delegate method textField:shouldChangeCharactersInRange:replacementString: gets called. Use this to fetch records from database and reload the tableview.

See similar post here and apple's sample code here

0

精彩评论

暂无评论...
验证码 换一张
取 消