Nisha
Nisha

Reputation: 354

GMSAutocompleteViewController want to get text which is in searchbar on search click

Hi i have used GMSAutocompleteViewController full-screen control. https://developers.google.com/places/ios-api/autocomplete#add_an_autocomplete_ui_control

i am not able to get keyboard search click event tried by searchbar event and textfieldshouldreturn event but it is not called. i want to get text which i have typed when any location not found in google.

Upvotes: 2

Views: 1615

Answers (3)

Vikram Sinha
Vikram Sinha

Reputation: 609

try removing restriction of the api from the console

https://console.cloud.google.com/apis/credentials?project=.

it helped me.

thnx

Upvotes: 0

Ankush Bhatia
Ankush Bhatia

Reputation: 163

From the Google Places API documentation..

https://developers.google.com/places/ios-api/autocomplete#add_an_autocomplete_ui_control

Use a results controller when you want more control over the text input UI

You can not access search bar if you are using GMSAutocompleteViewController. You have to use GMSAutocompleteResultsViewController.

Upvotes: 1

Brorsoeu.Sen
Brorsoeu.Sen

Reputation: 3

Make sure you have put your provideAPIKey.

Upvotes: 0

Related Questions