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]);
}
现在奇怪的是,我有时可以进入大于 0 的 mapView.annotations 计数。因此,我有额外的“保护”,并尝试手动删除该项目,而不是被 NSLogged 注销。
然而最终计数仍然是1!
最奇怪的是!
最佳答案
已记录 Apple 的错误......
他们承认这是 4.2 的问题
关于iphone - MapKit 未删除所有注释,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4232755/