开发者

Custom UITextField Autocomplete [duplicate]

开发者 https://www.devze.com 2023-03-15 22:56 出处:网络
This question already has answers here: UITextField Autocomplete? (6 answers) Closed 8 years ago. I want to implement a custom autocomplete functionality in a UITextField that will use the
This question already has answers here: UITextField Autocomplete? (6 answers) Closed 8 years ago.

I want to implement a custom autocomplete functionality in a UITextField that will use the values provided by me, not the iPhone dictionary. Does any one knows how to do it or could poi开发者_StackOverflow社区nt me to some resources?


You can use this UITextField subclass:

https://github.com/hoteltonight/HTAutocompleteTextField

The example shows you how to use an array as the data source for the autosuggest text. The suggested text appears "ghosted", like you see in the address bar in a browser, as opposed to the speech bubble that iOS uses to autocomplete/suggest.


Here's Another alternative. Fully customizable and configurable.


Here's something same that I come across.

http://www.radulucaciu.ro/iphone-autocomplete-class/5/


I've created a UITableViewController that you can add to your class very easily. The code is located here:

https://github.com/raulzito234/AutoCompleteTableViewController

0

精彩评论

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

关注公众号