Я пытаюсь передать пользовательскую аннотацию в NSMutableArra, чтобы использовать ее для заполнения вида таблицы. Кода:iphone, передающий аннотацию массиву
в .h я определяю NSMutableArray *mapViewAnnotations;
затем в ом
- (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 приводит к нулю. Перарпы Невозможно скопировать объект MyLocation в mutablearray?
Заранее спасибо.
Похоже, что вы никогда не инициализировали свой NSMutableArray. По умолчанию значение null. – FreeNickname
http://stackoverflow.com/questions/6410798/annotation-on-the-map-problem/6411217#6411217 – rptwsthi