I got some trouble to find how to use a string for my CLLocationCoordinate2D name variable. In my code I got 90 location :
CLLocationCoordinate2D location1;
...
CLLocationCoordinate2D location90;
And I would like to call this method :
locationConverToImage = [myMapView convertCoordinate:location1 toPointToView:drawView];
in a for loop like this :
for (int i=1; i<=90; i++) {
NSString *newCoord = @"location";
[newCoord stringByAppendingString:[NSString stringWithFormat:@"%d",i]];
locationConverToImage = [myMapView convertCoordinate:newCoord toPointToView:drawView];
}
But the problem is that I can't use string for the variable name. How can I do ?
Thanks.