Iphone 为什么只有一个视图接点注释显示?

Iphone 为什么只有一个视图接点注释显示?,iphone,annotations,mapkit,Iphone,Annotations,Mapkit,我使用以下代码,它在地图视图上只显示一个pin(注释)。请帮我找出我的错误 - (void)mapView:(MKMapView *)mapView didAddAnnotationViews:(NSArray *)views { //Here NSLog(@"didAddAnnotationViews"); [self.mapView selectAnnotation:[[self.mapView annotations] objec

我使用以下代码,它在地图视图上只显示一个pin(注释)。请帮我找出我的错误

- (void)mapView:(MKMapView *)mapView didAddAnnotationViews:(NSArray *)views
    {
        //Here

        NSLog(@"didAddAnnotationViews");

        [self.mapView selectAnnotation:[[self.mapView annotations] objectAtIndex:0] animated:NO];
        [self.mapView selectAnnotation:[[self.mapView annotations] objectAtIndex:1] animated:NO];
        [self.mapView selectAnnotation:[[self.mapView annotations] objectAtIndex:2] animated:NO];
        [self.mapView selectAnnotation:[[self.mapView annotations] objectAtIndex:3] animated:NO];

          }
为什么只有一个视图插针注释显示?

请访问:多个注释标注显示在MKMapView中


似乎您必须为此行为实现自定义标注。就我个人而言,我喜欢实现MKAnnotationView子类来实现自定义视图。

看看这个。甚至还有示例代码。它可能有助于您查找内容。

我的意思是调用…^^^如何同时显示多个调用!