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