【发布时间】:2010-05-22 05:26:10
【问题描述】:
我在尝试使用不同坐标更新注释位置时遇到问题。有什么方法可以更改 de location 属性而无需创建另一个注释?我试过下面的代码没有运气。我试图获取的注释没有更新它的位置。请帮忙!
CLLocationCoordinate2D location;
location.latitude = -36.560976;
location.longitude = -59.455807;
for (id annotation in self.mapView.annotations) {
if ([annotation isKindOfClass:[MyAnnotation class]])
{
[annotation setCoords:location]; //setCoords is defined in MyAnnotation class
}
}
谢谢大家!
【问题讨论】:
标签: iphone coordinates mkannotation mkannotationview