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 similar to the PHP foreach
enumerator like:
foreach ($dictionary as $key => $value);
Perhaps look into NSDictionary's method:
enumerateKeysAndObjectsUsingBlock:(void (^)(id key, id obj, BOOL *stop))
If you're not familiar with blocks in C/Objective-C, this is a good tutorial: http://thirdcog.eu/pwcblocks/