我正在使用Google Maps SDK for iOS應用程序。我需要自定義markerinfowindow。我在viewDidLoad中添加谷歌地圖markerInfowindow代表不會調用ios
1)@interface MapsViewController : UIViewController GMSMapViewDelegate
2)mapView_.delegate = self;
和
3)
- (UIView *)mapView:(GMSMapView *)mapView markerInfoWindow:(GMSMarker *)marker{
UIView *InfoWindow = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 150, 200)];
UILabel *nameLabel = [[UILabel alloc]init];
nameLabel.text = @"hi";
[InfoWindow addSubview:nameLabel];
return InfoWindow;
}
但控制不markerInfoWindow正在添加。
我已經添加marker.infoWindowAnchor –