Gre*_*reg 1 annotations mkmapview ios
好奇,如果有人可以帮助一件事:
我只想告诉Xcode,如果地图上同时存在"addAnnotation"和"newAnnotation"引脚,则删除初始的"newAnnotation"引脚.
我的非工作代码如下:
if ([self.mapView addAnnotation:addAnnotation] & [self.mapView addAnnotation:newAnnotation] return)
{
[self.mapView removeAnnotation:newAnnotation];
}
Run Code Online (Sandbox Code Playgroud)
谢谢!
谢谢你的反馈,但我解决了这个问题:
NSArray *existingpoints = mapView.annotations;
if ([existingpoints count])
[mapView removeAnnotations:existingpoints];
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1564 次 |
| 最近记录: |