我保持NSMutableDictionary
pair.Now我需要为每个it.How值从字典retrive值执行一些操作保持键和值。如何获取Objective-C中字典中每个键的值?
// this is NSMutableDIctionary
NSMutableDictionary *dictobj = [[NSMutableDictionary alloc]init];
// in methodA
-(void)methodA
{
//get the value for each key and peform an operation on it.
}
如何进行? plz帮助
wher是CurrentValue的声明?其中的类对象是什么? – suse 2010-02-18 04:04:23
这是一个利用“快速列举”(就像其他的答案)的。 'currentValue'在for-in循环中声明为正确。 – andyvn22 2010-02-18 04:13:22