I'm creating a map on IOS and on each annotation click I'm adding a custom subview like the following:
- (void)mapView:(MKMapView *)mapView didSelectAnnotationView:(MKAnnotationView *)view {
//load pin callout
nearbyMapCallout *calloutView = [[nearbyMapCallout alloc]init];
calloutView = (nearbyMapCallout *)[[[NSBundle mainBundle] loadNibNamed:@"nearbyMapCallout" owner:self options:nil] objectAtIndex:0];
CGRect calloutViewFrame = calloutView.frame;
calloutViewFrame.origin = CGPointMake(-calloutViewFrame.size.width/2 + 37, -calloutViewFrame.size.height + 35);
calloutView.frame = calloutViewFrame;
[view addSubview:calloutView];
}
So now how can I trigger an event when clicking a specific annotation callout subview ?