gpt4 book ai didi

iphone - MapKit 未删除所有注释

转载 作者:行者123 更新时间:2023-12-03 20:00:21 25 4
gpt4 key购买 nike

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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com