ios - GMSAutocompleteViewController 去掉“取消”按钮
问题描述
我正在尝试删除 google maps API for ios 的 GMSAutocompleteViewController 中的默认“取消”按钮。我该怎么做呢?这可能吗?
在此处输入图像描述
解决方案
GMSAutocompleteViewController 没有“SearchBar”对象的任何引用来更改或隐藏“取消”按钮。您可以在 GMSAutocompleteViewController 内部检查“SearchBar”是否没有 IBOutlet。
您只能通过使用自己的 SearchBar 创建自定义视图控制器来隐藏取消按钮。
推荐阅读
- magento2 - Magento 2 安装后不加载 css 或 js:升级
- asp.net - 带有身份的网络表单,需要迭代用户的角色
- reactjs - 如何使用 React.js 在 React.createElement() 中传递回调函数
- amazon-s3 - 如何配置 mlflow 跟踪服务的工件存储以使用 minio STS 生成的 acces_key、secret_key 和 session_token 连接到 minio S3
- php - 如何保存和更新可重复自定义字段的复选框
- r - R Shiny navbarPage中的静态图像(png)
- kubernetes - Prometheus /etc/config/prometheus.yml:Kubernetes 没有这样的文件或目录
- linq - 为什么 EF Core DbSet LINQ 找不到存在的值?
- xamarin.forms - Xamarin 表单:在外部应用程序中打开 PDF 文件
- vue.js - Vuejs 和 axios 的数组问题