我以这种方式向我的地图添加注释:
MyAnnotation *annotationPoint2 = [[MyAnnotation alloc] init];
annotationPoint2.coordinate = anyLocation;
annotationPoint2.title = [NSString stringWithFormat:@"%@", obj];
annotationPoint2.subtitle = @""; //or set to nil
annotationPoint2.keyValue = [NSString stringWithFormat:@"%@", key];
[mapPins addAnnotation:annotationPoint2];
别针都是红色的,我希望它们都是绿色的。我怎样才能改变颜色?我尝试了以下方法,但它仍然给出了一个红色标记:
annotationPoint2.pinColor = MKPinAnnotationColorGreen;