0
我有这样的代码删除,并在我的地图上添加新的引脚:IOS:MKPinAnnotationView动画降不工作
- (IBAction)setLocation:(id)sender{
NSMutableArray *toRemove = [NSMutableArray arrayWithCapacity:1];
for (id annotation in map.annotations)
if (annotation != map.userLocation)
[toRemove addObject:annotation];
[map removeAnnotations:toRemove];
MKPointAnnotation *annotationPoint = [[[MKPointAnnotation alloc] init]autorelease];
annotationPoint.coordinate = map.userLocation.coordinate;
annotationPoint.title = @"Position";
[map addAnnotation:annotationPoint];
MKPinAnnotationView *pinView = [[[MKPinAnnotationView alloc] initWithAnnotation:annotationPoint reuseIdentifier:@"Pin"] autorelease];
pinView.pinColor = MKPinAnnotationColorRed;
pinView.canShowCallout = YES;
//pinView.rightCalloutAccessoryView = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
pinView.animatesDrop = TRUE;
}
,但我把我的脚就不会做动画,但我设置animatesDrop =真的,为什么?
没有,当我把这个IBAction为pinView出现.. .so你有什么解决方案? – CrazyDev 2012-07-17 23:18:10