Autocomplete search example for iPhone

前端 未结 2 949
庸人自扰
庸人自扰 2021-01-03 05:26

Can someone point me in the direction of how to implement an \"autocomplete\" search interface on the iPhone. I am assuming I will need to use a NSTimer to periodically chec

相关标签:
2条回答
  • 2021-01-03 05:57

    You can try this tutorial from Ray Wenderlich http://www.raywenderlich.com/336/how-to-auto-complete-with-custom-values

    0 讨论(0)
  • 2021-01-03 06:00

    This Stack Overflow answer will likely help you. If you are using a UISearchDisplayController, you would not need to use an NSTimer to poll the search field, as changes to the search field will fire delegate methods for you.

    In those delegate methods, you may apply a new search predicate based on the contents of the field, and then refresh the data fetch and display possible words.

    0 讨论(0)
提交回复
热议问题