Displaying suggested locations in 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

  • iPhone/iOS Status bar not hiding in Xcode project
  • how to create folder on Google Drive using Google Drive SDK for iPhone?
  • iOS Facebook SDK 3.1 add permission when login
  • UIView outside of a View Controller in a Storyboard
  • Using UITableViewCell in a UITableView
  • Can clang generate a call graph for an Xcode project (in Objective-C?
  • 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:

    Screenshot of what I am trying to do

    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.

    5 Solutions Collect From Internet About “Displaying suggested locations in UITableView”

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

    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

    I know it’s quite late, but maybe it can help others,
    I’ve recently created autocomplete view, which can be attached to any UITextField, with single line of code. Colors, separators, margins can be configured. Ships with google locations completion source.

    You can clone it from GitHub

    It looks like you want a UISearchDisplayController.

    Apple has a quite useful Table View Programming Guide.