Xcode MKMapAnnotations未选择AnnotationView未响应

Xcode MKMapAnnotations未选择AnnotationView未响应,xcode,ios5,mkmapview,mapkit,mkannotationview,Xcode,Ios5,Mkmapview,Mapkit,Mkannotationview,我正在创建一个应用程序,从服务器中提取数据,并在地图上精确定位不同的房屋。我的问题是,它确实显示注释,但当我单击它们时,它们没有响应 -(无效)地图视图:(MKMapView*)地图视图未选择注释视图:(MKAnnotationView*)视图 我通过以下方式将注释放入数组: int s; self.mapAnnotations = [[NSMutableArray alloc] init]; for(s=0; s < numberOfAnnotations; s++) { //

我正在创建一个应用程序,从服务器中提取数据,并在地图上精确定位不同的房屋。我的问题是,它确实显示注释,但当我单击它们时,它们没有响应 -(无效)地图视图:(MKMapView*)地图视图未选择注释视图:(MKAnnotationView*)视图

我通过以下方式将注释放入数组:

int s;
self.mapAnnotations = [[NSMutableArray alloc] init];

for(s=0; s < numberOfAnnotations; s++)
{
    //NSDictionary *dict2 = [parser objectWithString:[[arrayOfResults objectAtIndex:0] description]];

   CLLocationDegrees daLong = [[[[[arrayOfResults objectAtIndex:s] objectForKey:@"map"] objectForKey:@"longitude"] description] floatValue];
   CLLocationDegrees daLat = [[[[[arrayOfResults objectAtIndex:s] objectForKey:@"map"] objectForKey:@"latitude"] description] floatValue];

    /*self.customAnnotation = [[BasicMapAnnotation alloc] initWithLatitude:daLat andLongitude:daLong];
    [self.mapView addAnnotation:self.customAnnotation];*/

    BasicMapAnnotation *m = [[BasicMapAnnotation alloc] initWithLatitude:daLat andLongitude:daLong];
    [self.mapAnnotations addObject:m];


}

[self.mapView addAnnotations:self.mapAnnotations];
NSLog(@"this number of annotations %d", [self.mapAnnotations count]);
当我点击它时,它确实起作用了,但是通过数组的那些没有起作用。
有人能帮我弄清楚它为什么没有响应吗?

这是因为注释应该有一个
标题,以便显示标注。在
for
循环中,设置
title
属性,就像对
self.normalAnnotation.title=@“
所做的那样,这是因为注释应该有
title
才能显示标注。在
for
循环中,像对
self.normalAnnotation.title=@“
那样设置
title
属性

self.normalAnnotation = [[BasicMapAnnotation alloc] initWithLatitude:38 andLongitude:-90.2045];
self.normalAnnotation.title = @"                                                         ";
[self.mapView addAnnotation:self.normalAnnotation];