Wednesday, September 18, 2013

Removing Annotations From MKMapView


for (int index = 0; index < [[[self aMapView] annotations] count]; index++) {
    if ([[[[self aMapView] annotations] objectAtIndex:index] isKindOfClass:[MyAnnotation class]]) {
        [[self aMapView] removeAnnotation:[[[self aMapView] annotations] objectAtIndex:index]];
    }
}

No comments: