草庐IT

ios - 为什么我的 'didTap marker' 函数不起作用?

我一直在构建GooglemapiOS应用程序,但不知何故我的“didTap标记”功能不起作用。如果我点击map上的标记,整个View只会被拖到左边,但不会运行任何代码。否则,下面的打印功能将起作用。哪里可能会导致这个问题?funcmapView(_mapView:GMSMapView,didTapmarker:GMSMarker){varlat:CLLocationDegrees=marker.position.latitudevarlng:CLLocationDegrees=marker.position.longitudevarformattedCoordinate=CLLocat