Search Results

Search found 1 results on 1 pages for 'skinny123'.

Page 1/1 | 1 

  • remove Annotation removes random amount of annotations at a time

    - by skinny123
    I've got this code to erase an annotations (pins) in my mkmapview without erasing my blue dot (userLocation). The problem is that it erasing the pins I've added in seemingly random numbers. when it's called through an IBAction it removes the first 5 then click again it removes the next 3, then the next 2, then the last one. When pressed I need it to remove that latest pin...etc. etc. for (int i = 0; i < [mapView.annotations count]; i++ ) { if ([[mapView.annotations objectAtIndex:i] isKindOfClass:[MyAnnotation class]]) { [mapView removeAnnotation:[mapView.annotations objectAtIndex:i]]; } }

    Read the article

1