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????
+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
2010-07-13 04:49:46
This worked great. Should be marked correct answer.
Oh Danny Boy
2010-08-26 15:32:46