iphone - MapKit 未删除所有注释

标签 iphone mapkit mkmapview mkannotation mkannotationview

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/

相关文章:

iphone - UIScrollView 不响应 scrollRectToVisible :animated: called from ViewDidLoad in iOS 5

iphone - loadView的正确实现方式?

ios - 为什么 calloutAccessoryControlTapped 也会在注释 View 上被调用?

ios - 带有集群注释的 map View

iOS UIView 推送 View Controller

iphone - 在 Restkit 中处理 NSAsserts 抛出

ios - NSDate 语言环境在将 NSDateFormatter 与 NSString 和 NSDate 一起使用时导致其他语言环境出现问题

ios - 如何将新的谷歌地图应用程序与 iOS 应用程序集成

iPhone:route-me 项目的注释 View (如 MKAnnotationView)?

iPhone MapView 仅限于密苏里州