It is very easy to animate annotation's coordinate on iOS using the following method:
[UIView animateWithDuration:1.0f
animations:^(void){
annotation.coordinate = ...
}
completion:^(BOOL finished)completion{
NSLog(@"Animation complete");
}
However on OSX equivalent method +[NSAnimationContext runAnimationGroup:]
does not work for me - annotation jumps to new location and calls completion handler immediately i.e. it does not last 10 seconds as expected:
[NSAnimationContext runAnimationGroup:^(NSAnimationContext *context) {
context.duration = 10;
annotation.coordinate = destination;
} completionHandler:^{
NSLog(@"Animation complete");
}];
I am new to OSX that's why I guess I'm missing something simple here to make this animation work. One guess I have is that @coordinate property is not animatable on OSX MKMapView's annotations but that would make a really strange difference in implementations of MapKit on iOS and OSX.
I created simple test application to isolate this problem.