1

I need to offer users a way to type an address in an UITextField with an autocompletion functionality as user is introducing the text. I've been looking for the best way to implement this, but I'm still not sure: is it possible to get a list of street names for a certain city? Or should I being provided such information in another and custom way (service request, a file with that information...)?

My application is for iOS 7+

Thanks

AppsDev
  • 12,319
  • 23
  • 93
  • 186

1 Answers1

2

You can do this by using Google Places autocomplete API.This api provide you addreess that you want in list.

For More info please refer this example that help you to how to use Google Places autocomplete with your application

https://maniacdev.com/2013/10/ios-completion-providing-search-with-autocompletion-and-map-marking-using-google-places

you can find sample code for the same on Github find Below link for this

https://github.com/chenyuan/SPGooglePlacesAutocomplete

Hope this may help you.

user1548843
  • 670
  • 12
  • 20
  • Thanks for your answer, do you know if `MKLocalSearch` offers the same functionality as `Google Places API`? – AppsDev Jan 07 '15 at 10:24
  • yes,MKLocalSearch is also useful it would be introduces in ios 6.0. you can use it too.I am not sure how much it accurate in reference to Google Place autocomplete API Because never used MKLocalSearch.You can find below Example link that may help you for MKLocalSearch. https://github.com/iamamused/Example-MKLocalSearch – user1548843 Jan 07 '15 at 11:25
  • MKLocalSearch http://jeffreysambells.com/2013/01/28/mklocalsearch-example stack overflow this link also help you http://stackoverflow.com/questions/13798804/use-mklocalsearch-to-search-for-locations-on-a-map – user1548843 Jan 07 '15 at 11:32