简体   繁体   中英

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.

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 .

确保你已经把你的provideAPIKey。

try removing restriction of the api from the console

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

it helped me.

thnx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM