ios - 如何检测何时点击谷歌地图 iOS Swift?
问题描述
我想检查并检测何时点击地图标记或任何东西。iOS Swift 4 中的谷歌地图在这种情况下是否存在任何代表?
谢谢。
解决方案
func mapView(_ mapView: GMSMapView, didTapAt coordinate: CLLocationCoordinate2D) {
//Write your code here...
}
如果未调用委托函数,则在viewDidAppear()
方法或LocationManager
didUpdateLocations()
方法中设置 mapview 委托。
推荐阅读
- python - 连接到 Binance websocket 时出错
- android - Android Retrofit 的 @Path 不起作用。为什么?
- mysql - sql只选择重复的行
- .net-5 - 如何在 .Net Core 中创建用户可管理的业务规则
- html - 输入和按钮未水平对齐
- javascript - 在 nunjucks 循环中构建数组/对象
- json - 将带逗号的 JSON 加载到雪花中时出现问题
- sql - SQL Self Join 不在 PopSQL 中“加入”
- angular - 自定义 HostBinding 装饰器在生产模式下不起作用
- php - 以 Symfony 形式上传文件