gpt4 book ai didi

ios - GMSAutocompleteViewController 想要在搜索点击时获取搜索栏中的文本

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:07:43 24 4
gpt4 key购买 nike

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

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

最佳答案

来自 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com