So I have this problem. I'm trying to add a bunch of annotations to my MapView, of various different colors. I've implemented the correct protocols, and I'm calling the addAnnotation method in the map view object. The issue is that either none or very few annotations appear (I'm not sure what the factor that determines this change is).

I have this method called updateNodes that is being called regularly (about every 5 seconds). This method goes through an array of custom objects I've made called, Party objects. In my main View Controller I have a property called "currentParty" which the current party points through. The objective of this method is pretty much to loop through each party, adding it to the map, and then stop.

Theoretically this is all working to the program. There are around 8 Party objects at a time in the array, and each object has the "addAnnotation" method called on it (I've tested it with a few NSLog statements). But the error is that the annotations themselves aren't being added to the map. I've overridden the viewForAnnotation method, but that method for some reason is being delayed when it's getting called, and it's only getting called around once, when I expected it to be getting called each time the addAnnotation method is called (which is about 8 times). However it is only called once (again, tested with a print statement at the top of the method).

The code is below:

//Main view controller
- (void)viewDidLoad{
    currentParty = [[Party alloc] init];
    [ViewController instantiatePartyArray];
    initialPinAlreadyAdded = NO;
    NSLog(@"View Did Load Called");
    [super viewDidLoad];
	manager = [[CLLocationManager alloc] init];     //Instantiate CLLocationManager
         //Array that holds all parties. Should be populated from the database
    manager.desiredAccuracy = kCLLocationAccuracyBest;  //Best accuracy
    manager.delegate = self;            //Delegate the manager to affect this View Controller = self;
    [manager startUpdatingLocation];     //Triangulate location
    NSLog(@"Triangulation Started");
    MKCoordinateSpan span;
    span.latitudeDelta = 0.01;      //10 km up and down
    span.longitudeDelta = 0.01;     //10 km side to side
    MKCoordinateRegion region;
    region.span = span; = startingUserLocation.coordinate;
    if(loc.coordinate.latitude != 0 && loc.coordinate.longitude != 0){
        [map setRegion: region animated: YES];
        NSLog(@"Setting Region");
        [NSTimer scheduledTimerWithTimeInterval:3.0 target:self selector:@selector(lockToLocation:) userInfo:nil repeats:NO];
        NSLog(@"Waiting Started");
    NSLog(@"Waiting Finished");
    [ViewController updateArray];
    [self updateNodes];
-(MKAnnotationView *)mapView:(MKMapView *)mV viewForAnnotation:(id <MKAnnotation>)annotation{
    NSLog(@"Map View Method Called");
    MKPinAnnotationView *pinView = [[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:nil];
    pinView.pinColor = [currentParty getPartyColor];
    currentParty.annot.title = [currentParty getPartyName];
    return pinView;
-(void) updateNodes{
    for(Party *party in allParties){
            party.alreadyAdded = YES;
            currentParty = party;
            [map addAnnotation:currentParty.annot];
            NSLog(@"Adding Successful!");
Really not liking the way I have to deal with custom annotations!