ios - 自定义信息窗口上方的按钮,但不会触发

标签 ios google-maps-markers google-maps-sdk-ios

当我点击一个标记时,我希望 map 弹出一个自定义信息窗口,而不是默认信息窗口。 自定义信息窗口上有一个按钮,但是当我单击该按钮时。该按钮没有触发!!! 我需要你的帮助,帮助,帮助......

-(UIView*)mapView:(GMSMapView *)mapView markerInfoWindow:(GMSMarker *)marker
{
    NSLog(@"sssssssss");
    self.iCallOutView.nameLabel.text=marker.title;
    self.iCallOutView.coordinate=marker.position;
    return self.iCallOutView;
}

最佳答案

查看此主题 How to force refresh contents of the markerInfoWindow in Google Maps iOS SDK

Note: The info window is rendered as an image each time it is displayed on the map. This means that any changes to its properties while it is active will not be immediately visible. The contents of the info window will be refreshed the next time that it is displayed.

所以我认为您不能处理信息窗口中任何控件的任何事件。

关于ios - 自定义信息窗口上方的按钮,但不会触发,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16827604/

相关文章:

ios - Swift 为现有用户默认值增加值(value)

ios - 如何将 Google MapView 放入 UIView 中?

ios - 关于iOS版GoogleMaps SDK许可

ios - 如何通过单击 UIButton IOS7 来设置 UILabel 的值

ios - 裁剪后无法绘制阴影

ios - 旋转在 iOS6 上表现不同

google-maps-api-3 - 计算谷歌地图可见区域的标记数量

google-maps - InvalidValueError : in property origin: not a string in google map

google-maps - 我们可以在 Flutter 的 Google map 上显示一些动态文本和标记吗?

ios - 当前位置图像的问题