1

我正在尝试做自定义地图标注视图:

- (void)mapView:(MKMapView *)mapView didSelectAnnotationView:(MKAnnotationView *)view
{
    if ([view.annotation isKindOfClass:[MKUserLocation class]])
    {
        UIView * callout = [[NSBundle mainBundle] loadNibNamed:@"MyCallout" owner:nil options:nil][0];
        for (int i = 0; i < view.subviews.count; i++)
            [view.subviews[i] setHidden:YES];
        [view addSubview:callout];
        view.userInteractionEnabled = YES;
        return;
    }

    // ...
}

所以我的标注无法访问,无法按下按钮等......

4

0 回答 0