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.
With the Help of Table view and search bar you can create presentation of City list. Now about API for city list there is many link availibale on Map for same. Please refer below
http://www.geonames.org/export/
https://developers.google.com/adwords/api/docs/appendix/cities_world
Download Table from above URL and place this with resource directory and use this for suggestion.
See more link for same
http://www.geodatasource.com/cities-free.html
http://weather.noaa.gov/data/nsd_cccc.txt
http://www.geonames.org/export/JSON-webservices.html#citiesJSON
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With