我将数组添加到字典中,然后从数组中删除所有对象。当我打印字典时,它也显示为空。意味着字典中存在的数组数据也被删除。
if ([[[array objectAtIndex:0]objectAtIndex:i] isEqualToString:[filteredAry objectAtIndex:j]])
{
[menuAry addObject:[array1 objectAtIndex:i]];
}
[tempDict setValue:menuAry forKey:[filteredAry objectAtIndex:j]];
[menuAry removeAllObjects];
为什么 tempdict 显示为空?