I've followed the Google Maps Custom InfoWindows Video very closely and can't seem to get mine to work. Here is part of my viewcontroller.m:
GMSMarker *food = [[GMSMarker alloc] init];
food.position = CLLocationCoordinate2DMake(43.468725, 11.287411);
food.map = mapView_;
mapView_.mapType = kGMSTypeTerrain;
food.icon = [UIImage imageNamed:@"foodmarker"];
}
-(UIView *) mapView:(GMSMapView *)mapView markerInfoWindow:(GMSMarker *)food
{
CustomInfoWindow *infoWindow = [[[NSBundle mainBundle] loadNibNamed:@"InfoWindow" owner:self options:nil] objectAtIndex:0];
infoWindow.name.text = @"FoodPlace";
infoWindow.address.text = @"Some kinda food location";
infoWindow.photo.image = [UIImage imageNamed: @"food"];
return infoWindow;
}
I get an error on return infoWindow saying: Incompatible pointer types returning 'CustomInfoWindow *' from a function with result type 'UIView *'
My CustomInfoWindow class is wired up to the Nib that will be displayed as the custom info window. The issue is that when I tap on the marker nothing happens or appears.