tags:

views:

226

answers:

2

I have used pin images in application instead of standard pin, now i want to give animation (dropping effect as it was with standard pins) to custom pins. How can i provide dropping animation effect to custom pin images????

A: 

This should help

dwery
+2  A: 

Implement the following delegate method.

- (void)mapView:(MKMapView *)mapView didAddAnnotationViews:(NSArray *)views { 
   MKAnnotationView *aV; 
   for (aV in views) {
     CGRect endFrame = aV.frame;

     aV.frame = CGRectMake(aV.frame.origin.x, aV.frame.origin.y - 230.0, aV.frame.size.width, aV.frame.size.height);

     [UIView beginAnimations:nil context:NULL];
     [UIView setAnimationDuration:0.45];
     [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
         [aV setFrame:endFrame];
     [UIView commitAnimations];

   }
}
Biranchi
This worked great. Should be marked correct answer.
Oh Danny Boy