我想向我的MKAnnotation添加自定义值。我想让它存储该位置的唯一ID。我设置了标注有标题和副标题的代码是这样的:将自定义属性添加到MKAnnotation
location.latitude = [dictionary[@"placeLatitude"] doubleValue];
location.longitude = [dictionary[@"placeLongitude"] doubleValue];
newAnnotation = [[MapViewAnnotation alloc] initWithTitle:dictionary[@"placeName"]
andCoordinate:location];
newAnnotation.subtitle = dictionary[@"placeCity"];
我将如何添加自定义属性,例如“placeId”?这是我有:
newAnnotation.placeId=dictionary[@"placeId"];
任何帮助将是伟大的。谢谢!
嗨巴尔加维,你知道我怎么会去这样做? – Brandon 2013-02-13 07:27:12
使用类别类 – 2013-02-13 07:33:29