I, do you know that MKPinAnnotationView has a method "animatesDrop" to animate a pin annotation from the top to point on the map with a shadow?!..OK...is possible do this with a custom image??
thanks..:)
I, do you know that MKPinAnnotationView has a method "animatesDrop" to animate a pin annotation from the top to point on the map with a shadow?!..OK...is possible do this with a custom image??
thanks..:)
You can always do your custom animation in MKMapViewDelegate method.
- (void)mapView:(MKMapView *)mapView didAddAnnotationViews:(NSArray *)views
Probably something like that (you won't get the fancy shadow animation, if you want it you need to do it yourself) :
- (void) mapView:(MKMapView *)mapView didAddAnnotationViews:(NSArray *)views {
CGRect visibleRect = [mapView annotationVisibleRect];
for (MKAnnotationView *view in views) {
CGRect endFrame = view.frame;
CGRect startFrame = endFrame; startFrame.origin.y = visibleRect.origin.y - startFrame.size.height;
view.frame = startFrame;
[UIView beginAnimations:@"drop" context:NULL];
[UIView setAnimationDuration:1];
view.frame = endFrame;
[UIView commitAnimations];
}
}