我想为添加为 MKOverLay 的圆圈设置动画。我希望它从屏幕顶部掉下来。如何通过委托方法制作动画?还是在叠加层的添加中?谁能指出我正确的方向?谢谢!
我在 mapView 委托方法中有这个
-(MKOverlayView *)mapView:(MKMapView *)mapView viewForOverlay:(id<MKOverlay>)overlay
{
if([overlay isKindOfClass:[MKCircle class]]) {
// Create the view for the radius overlay.
MKCircleView *circleView = [[MKCircleView alloc] initWithOverlay:overlay];
circleView.strokeColor = [UIColor whiteColor];
circleView.fillColor = [[UIColor blueColor] colorWithAlphaComponent:0.2];
return circleView;
}
return nil;
}
我像这样添加overLays:
MKCircle *circle = [MKCircle circleWithCenterCoordinate:userCoord radius:200];
[mainMapView addOverlay:circle];