- (void)mapView:(MKMapView *)mapView didAddAnnotationViews:(NSArray *)views {
if ([views count] == 0) {
return;
}
MKAnnotationView *aV;
for (aV in views) {
// set up pin beginning and end frames, shadow subview frame and center
[UIView animateWithDuration:0.75
delay:(0.0 + [views indexOfObject:aV]/10.0)
options:UIViewAnimationOptionCurveEaseOut
animations:^{
[aV setFrame:endFrame];
// animate the shadow subview's center point
}
completion:^ (BOOL finished) {
if (finished) {
// do something here when the animation finished
}
}];
}