【发布时间】:2012-10-18 11:56:22
【问题描述】:
我有一个字典数组,它来自一个核心数据获取请求,结果类型为NSDictionary:
request.resultType = NSDictionaryResultType;
request.returnsDistinctResults = YES;
request.propertiesToFetch = @[@"endCalYear",@"endMonth",@"periodLength"];
NSDictionary 的示例结果 NSArray 如下所示:
{
endCalYear = 2007;
endMonth = 12;
periodLength = 12;
},
{
endCalYear = 2006;
endMonth = 9;
periodLength = 3;
},
{
endCalYear = 2006;
endMonth = 6;
periodLength = 3;
},
{
endCalYear = 2006;
endMonth = 3;
periodLength = 3;
}
创建(三个)单独数组的最有效方法是什么endCalYear = 2006, 2007, 2008; endMonth = 3, 9, 12 和 periodLength = 3, 6, 12 来自给定的 NSArray?
谢谢!
【问题讨论】:
标签: objective-c ios arrays nsarray nsdictionary