Enumerate NSDictionary with keys and objects, PHP style

后端 未结 3 684
暗喜
暗喜 2021-02-07 09:36

I know you can Enumerate the keys or values of NSMutableDictionary using NSEnumerator. Is it possible to do both together? I\'m looking for something s

3条回答
  •  不知归路
    2021-02-07 10:01

    Now much easier:

    for (NSString * key in dict)
    {
        id/* or your type */ value = dict[key];
        ...
    }
    

提交回复
热议问题