Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to animate the movement of anotations on the MKMapView

How to animate the movement of annotations on the MKMapView? When position of annotation is changed, then annotation moving to other position with animation?

like image 544
Oksana Avatar asked Nov 27 '11 17:11

Oksana


1 Answers

This question has the answer.

Simply wrapping coordinate change in UIView animateWithDuration seems to work fine:

[UIView animateWithDuration:0.3f
                 animations:^{
    myAnnotation.coordinate = newCoordinate;
}]
like image 132
Pavel Alexeev Avatar answered Oct 29 '22 09:10

Pavel Alexeev