在UITableView中显示建议的位置 [英] Displaying suggested locations in UITableView

查看:81
本文介绍了在UITableView中显示建议的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基本上我想在我的应用程序中做的是有一个 UISearchBar ,当我写入时,它会反馈位置结果并将其填充到出现的UITableView中。我在这个网站上看到了另外一个问题:




Basically what I want to do in my app is have a UISearchBar which, when I write in, will feedback location results and populate that into a UITableView that appears. I see one more question on this site:

Display Locations on UITableview

But that really didn't help me, no answer helped me at all, and they were quite vague.

So, my question is. You know how some apps maybe you have to type in a city or country, but the user might not be able to fully spell it, so based on your UISearchBar results, it presents a TableView with the suggested cities. So say I am about to write Singapore, I don't know how it is spelled. So I write:

'Sing'

And BAM, a UITableView below pops up with different options/cell titles, including a cell that suggests 'Singapore'. Then I click on that cell and then my search bar is autofilled with 'Singapore'. Here is a screenshot example of what I want to do with a current app called 'iChangi' on the Singapore app store:

So I understand I should implement the UISearchBar delegate where the text changed, but what I want to know is there an API or database I can query to feedback the suggested cities? And how would I go around doing this, can you provide me with a tutorial on it or simply state a few steps.

解决方案

Check this project http://iosboilerplate.com/#maps

这篇关于在UITableView中显示建议的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆