Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get google suggestions and put it on UITableView while I typing in UITextField

This question is probably answered. I want to make UITextField with a suggestion table as shown below like Safari does:

Safari google search

I know how to get text while typing and search in my sqlite or core data bases for similar text. But, how can I connect to google or youtube "database" and get suggestions and most importantly show it in UITableView.

I tried this sample, but it only search in dictionary, not for online results!

Please give something to start with! THANKS!

like image 815
Black Pearl Avatar asked Dec 15 '22 03:12

Black Pearl


1 Answers

Use below to get search suggestions in XML format.

http://suggestqueries.google.com/complete/search?output=toolbar&hl=en&q=SEARCH_TERM

Parse the XML and display in your table view.

like image 129
san Avatar answered Dec 17 '22 17:12

san