I have created a custom UIView with XIB and I display this when a user taps on a marker by implementing markerInfoWindow
- (UIView *)mapView:(GMSMapView *)mapView markerInfoWindow:(GMSMarker *)marker
{
TESTInfoWindow *view = [[[NSBundle mainBundle] loadNibNamed:@"TESTInfoWindow" owner:self options:nil] objectAtIndex:0];
view.lblTitle.text = [marker title];
return view;
}
Everything works fine, my XIB is displayed and the title populated.
My issue is that I can't get the custom UIView, TESTInfoWindow to respond to touch events. (I want the user to be able to drag the custom info window and the app will respond based on the touchesEnd event.)
I've implemented touchesBegan and touchesMoved in TESTInfoWindow and neither get called:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
NSLog(@"DEBUG touchesBegan");
}
-(void) touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
NSLog(@"DEBUG touchesMoved");
}
I think the GMSMapView is receiving the touches that are ignored by the custom info window view.
How do I get my custom UIView to receive the touches? Any help appreciated.