Display suggested locations in a UITableView

Basically, what I want to do in my application is UISearchBarthat, when I write, it will display the search results and fill them into the displayed UITableView. I see another question on this site:

Show locations in UITableview

But it really didn't help me, no answer helped me, and they were pretty vague.

So my question. You know how some applications may need to be typed in a city or country, but the user may not be able to completely record it, so based on your results, UISearchBarhe presents a TableView with the proposed cities. So say I'm going to write Singapore, I don’t know how it is written. Therefore, I write:

'Sing'

And BAM, the UITableView below appears with various cell options / names, including the cell that Singapore offers. Then I click on this cell, and then my search bar is automatically populated with Singapore. Here is an example screenshot of what I want to do with the current application called iChangi in the app store in Singapore:

Screenshot of what I am trying to do

So, I understand what the delegate should implement UISearchBar, where the text has changed, but what I want to know is there an API or database to which I can request feedback on the proposed cities? And , as I will get around this, you can provide me with a tutorial on this subject or just point out a few steps.

+3
source share
5 answers

I know this quite late, but maybe it can help others. Recently I created autocomplete viewone that can be attached to anyone UITextFieldwith one line of code. Colors, separators, fields can be customized. Ships with google locations completion source.

You can clone it from github

+2
source

It looks like you want a UISearchDisplayController .

0
source

Apple has a pretty useful spreadsheet programming guide .

-1
source

All Articles