looping through an NSMutableDictionary

前端 未结 6 1048
野趣味
野趣味 2021-01-30 08:02

How do I loop through all objects in a NSMutableDictionary regardless of the keys?

6条回答
  •  太阳男子
    2021-01-30 08:42

    A standard way would look like this

    for(id key in myDict) {
        id value = [myDict objectForKey:key];
        [value doStuff];
    }
    

提交回复
热议问题