如何将mapView注释从一个位置动画到另一个位置?

时间:2014-09-24 11:35:52

标签: ios animation map

我的iPhone应用程序中有一个情况,我应该将我的注释(汽车图像)从一个位置移动到另一个位置....我对iOS很新。我以特定的时间方式从服务器获取坐标。我已经使用过HGMovingAnnotationSample,但我的情况有所不同。 请帮我。我已经浪费了太多时间。

1 个答案:

答案 0 :(得分:3)

您是否使用过简单的动画

-(void) animateAnnotation:(MyAnnotation*)annotation{
   [UIView animateWithDuration:2.0f
                    animations:^{
                         annotation.coordinate = newCordinates;
                    }
                    completion:nil];
}

检查一下可能会对你有帮助。