我正在尝试从属性列表中添加注释。我在这里找到了解决方案:
但它给了我一个错误“使用未声明的标识符“racks” ”和“使用未声明的标识符“GetRacks” ”:
// Add annotations
NSArray *bikePath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *bikeDocumentsDirectory = [bikePath objectAtIndex:0];
NSString *path = [bikeDocumentsDirectory stringByAppendingPathComponent:@"data.plist"];
NSDictionary* bikesDictionary = [[NSDictionary alloc] initWithContentsOfFile:path];
GetRacks racks = [[GetRacks alloc] initWithDictionary:bikesDictionary];
for(RackAnnotation *rackAnnotation in [racks getRacks])
{
[mapView addAnnotation:rackAnnotation];
}
有人可以帮我吗?