カスタム アノテーションを NSMutableArra に渡して、それを使用してテーブル ビューにデータを入力しようとしています。コードは次のとおりです。
.h で定義します NSMutableArray *mapViewAnnotations;
次に、.m
- (void)plotBarPosition:(NSString *)datos{
/*
code that extract data froma a json string
*/
MyLocation *nota =[[MyLocation alloc] initWithName:barNamePlusDistance coordinate:coordinate horario:horario oferta:offerta more:info];
NSLog(@"nota :%@",nota);
[_mapView addAnnotation:nota]; //annotation are plot on the map
[mapViewAnnotations addObject:nota];
NSLog(@"mapViewAnnotations:%@",mapViewAnnotations); //NSlog return null
}
mapViewAnnotations の結果は null です。Perarps MyLocation オブジェクトを可変配列にコピーすることはできませんか?
前もって感謝します。