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

标题: ios - 访问 GMSAutocompleteResultsViewController TableView [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-11 19:22
标题: ios - 访问 GMSAutocompleteResultsViewController TableView

我正在使用 GMSAutocompleteResultsViewController 并将 searchBar 放置在 NavigationBar 的标题 View 中。导航栏和标题 View 已扩展高度以容纳 Google 地方信息搜索栏上方的另一个搜索栏。除了 Google Places AutoComplete 表格部分显示在导航栏下方之外,这一切都很好。

有什么方法可以访问 GMSAutocompleteResultsViewController 表格 View ,以便我可以操纵它的显示位置?



Best Answer-推荐答案


如果您在 Storyboard 中设置了 View Controller ,请确保取消选中 UIViewController 及其包含的 UINavigationController< 中的 Extend edges Under Top Bars/

swift 3

self.edgesForExtendedLayout = []
self.navigationController?.edgesForExtendedLayout = []
definesPresentationContext = true

关于ios - 访问 GMSAutocompleteResultsViewController TableView,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43097719/






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