OGeek|极客世界-中国程序员成长平台

标题: ios - GMSAutocompleteViewController 想要在搜索点击时获取搜索栏中的文本 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-13 15:10
标题: ios - GMSAutocompleteViewController 想要在搜索点击时获取搜索栏中的文本

您好,我使用了 GMSAutocompleteViewController 全屏控制。 https://developers.google.com/places/ios-api/autocomplete#add_an_autocomplete_ui_control

我无法获得由搜索栏事件和 textfieldshouldreturn 事件尝试的键盘搜索点击事件,但它没有被调用。我想获取我在谷歌中找不到任何位置时输入的文本。



Best Answer-推荐答案


来自 Google Places API 文档..

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

如果您使用的是 GMSAutocompleteViewController,则无法访问搜索栏。您必须使用 GMSAutocompleteResultsViewController

关于ios - GMSAutocompleteViewController 想要在搜索点击时获取搜索栏中的文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35916867/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://sqlite.in/) Powered by Discuz! X3.4