我正在改变注解引脚的颜色,当点击注解引脚,并点击另一个注解引脚改变引脚颜色,所以目前有两个注解颜色改变,但我希望当前选择的注解颜色只改变旧的选择回到原来的颜色。提前感谢
发布于 2013-01-09 16:57:07
我找到了一个解决方案,创建一个
@property (nonatomic, retain) MKAnnotationView *selectedAnnotationView;在.h文件中,并在注释别针中单击时保存
- (void)mapView:(MKMapView *)mapView didSelectAnnotationView:(MKAnnotationView *)view
{
if (self.selectedAnnotationView) {
    self.selectedAnnotationView.image = [UIImage imageNamed:[NSString    stringWithFormat:@"a.png"]];
}
self.selectedAnnotationView = view;
view.image = [UIImage imageNamed:[NSString stringWithFormat:@"b.png"]];
}.m文件中的更改
https://stackoverflow.com/questions/14231183
复制相似问题