我創建iOS和每個標註的地圖點擊我加入類似以下的自定義子視圖:IOS事件單擊
- (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];
}
所以現在我怎麼可以觸發事件時,點擊特定的標註標註子視圖?
Hi @ gilm501你有沒有得到任何解決方案呢? –