The reason I'm asking this is because right now I use an NSMutableSet of integers and a corresponding NSMutableArray to store the rest of the data, but I think I'm not using the language right. Here's my code:
In the init function:
self.markerList = [[NSMutableArray alloc] init];
self.markerIdSet = [[NSMutableSet alloc] init];
And the function that updates the set and array:
- (void) addMarker: (RMMarker*)marker AtLatLong:(CLLocationCoordinate2D)point {
if (![self.markerIdSet member: [node objectForKey:@"id"]]) {
[self.markerIdSet addObject:[node objectForKey:@"id"]];
[self.markerList addObject:marker];
}
}