iOS的自动完成功能 [英] iOS autocomplete feature
问题描述
大多数人的意思是自动完成的应用程序有一个TextView /搜索栏/任何一个接受用户输入。附加到该组件是不断基于用户输入更新的tableview。这是一个很好的研究课题,现在是比较容易实现的感谢UISearchDisplay控制器。
What most people mean by autocomplete is that the app has a textview/searchbar/whatever which accepts user input. Attached to this component is a tableview which keeps updating based on the user input. This is a well researched topic and is now relatively easy to implement thanks to the UISearchDisplay controller.
现在这里是我想要的。当用户在的UISearchBar一些文本打字,不会有searchdisplaycontroller。相反,我希望应用程序做这样的事情在桌面上谷歌即时。也就是说,如果我输入goog,搜索栏应该显示的 goog *乐。因此,建议乐应该是比用户输入字符串谷歌的其他较轻的字体。所以,我不想要一个自动建议功能,我想要一个自动完成功能。
Now here is what I want. When the user is typing in some text in the UISearchBar, there will be no searchdisplaycontroller. Instead, I want the app to do something like Google Instant on desktops. That is, if I type "Goog", the searchbar should show Goog*le. So the suggestion "le" should be in a lighter font than the rest of the user input string Google. So I don't want an auto-suggest feature, I want an autocomplete feature.
我如何能做到这一点任何想法?
Any ideas on how I can do this?
谢谢!
推荐答案
我还没有尝试过,但这里出现做你问一个控件:
I haven't tried it but here's a control that appears to do what you're asking for:
http://cocoacontrols.com/platforms/ios/controls/doautocompletetextfield
这篇关于iOS的自动完成功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!