我将数组添加到字典中,然后从数组中删除所有对象。当我打印字典时,它也显示为空。意味着字典中存在的数组数据也被删除。
if ([[[testMenuGroupAry objectAtIndex:0]objectAtIndex:group] isEqualToString:[filteredAry objectAtIndex:objCount]])
{
NSLog(@"object count is %d",objCount);
[groupAry addObject:[array1 objectAtIndex:group]];
}
[tempDict setValue:groupAry forKey:[filteredAry objectAtIndex:objCount]];
[groupAry removeAllObjects];
NSLog(@"before Dictionary temp Dict : %@",tempDict);
tempdict 也显示空。为什么?