我在我的项目中使用Google Maps SDK。我想检查和检测何时点击谷歌地图,这是使用单指或双指?我的要求是,禁用单指使用,启用双指使用。我希望所有的手势都在双指上工作,而不是在单指上。
发布于 2019-12-16 18:27:32
首先,禁用GMSMapView实例上的所有手势。文档中写道:
You can disable the default gestures on the map by setting properties of the GMSUISettings class, which is available as a property of the GMSMapView
来源:https://developers.google.com/maps/documentation/ios-sdk/controls
然后,您可以添加一些UITapGestureRecognizer:
来源:https://developer.apple.com/documentation/uikit/uitapgesturerecognizer
不要忘记将numberOfTouchesRequired设置为2!
https://stackoverflow.com/questions/59333032
复制相似问题