我现在有:
fetchRequest.resultType = NSDictionaryResultType;
fetchRequest.propertiesToFetch = [NSArray arrayWithObject:[[entity propertiesByName] objectForKey:@"realLocationName"]];
这给了我这样的东西:
self.dict=
(
{
realLocationName = "some where";
},
{
realLocationName = somewhereelse;
}
)
我想从这本字典中的 cd 获取第二个属性值,但我不确定如何?
我尝试做这样的事情,但它只是用 locationID 覆盖 realLocationName
fetchRequest.resultType = NSDictionaryResultType;
fetchRequest.propertiesToFetch = [NSArray arrayWithObject:[[entity propertiesByName] objectForKey:@"realLocationName"]];
fetchRequest.propertiesToFetch = [NSArray arrayWithObject:[[entity propertiesByName] objectForKey:@"locationId"]];