I am trying to animate the alpha value of a MapKit overlay (specifically MKCircleView) in iOS 5 using the following code:
-(void) animateCircle:(MKCircle*)circle onMap:(MKMapView*) mapView { MKCircleView * circleView = (MKCircleView*) [mapView viewForOverlay:circle]; UIViewAnimationOptions options = UIViewAnimationOptionCurveEaseInOut|UIViewAnimationOptionTransitionNone; [UIView animateWithDuration:5.0 delay:0.0 options:options animations:^(void) { circleView.alpha = 0.9; } completion:^(BOOL finished) {} ]; }
The alpha value of the overlay changes as I want, but it jumps there instantly, rather than animating for the specified duration.
Can anyone suggest what might be wrong? Perhaps the animation on overlay views is more complicated with blocks than I thought.
source share