How to implement keywords associated function in swift?

馋奶兔 提交于 2019-12-03 01:05:07

问题


For example, when I input several letters, the corresponding words will show up automatically and then I can select them. But how to implement this kind of function? Which kind of UI element should I use ? Should I also input all countries in the world in cord data so that I can get the corresponding results ?


回答1:


The image you've shown appears to be simply a UITableView that appears and is populated in response to what the user types in a UITextField.




回答2:


If you're working with a table view similar to your screen shot, you can use a UISearchController. Here's a tutorial about it.



来源:https://stackoverflow.com/questions/35678224/how-to-implement-keywords-associated-function-in-swift

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!