3

MapKit 似乎有一个奇怪的问题!!!

我有一些添加一些注释的代码,然后我调用

NSArray *existingpoints = mapView.annotations;
[mapView removeAnnotations:existingpoints];
                if ([mapView.annotations count] > 0) {
                    for(Plane *annotation in mapView.annotations){
                        NSLog(@"Name: %@",annotation.reg);
                        [mapView removeAnnotation:annotation];
                    }
                    NSLog(@"\nMapCount:%i after attempting manual remove",[mapView.annotations count]);
                }

现在奇怪的是,有时我可以进入 mapView.annotations 计数大于 0。因此,我有额外的“保护”并尝试手动删除该项目而不是 NSLogged。

然而最终的计数仍然是 1!

最奇怪!

4

1 回答 1

2

已经记录了 Apple 的错误....

他们承认这是 4.2 的问题

于 2010-11-24T15:02:25.947 回答