3 ms·
You may already know this, but you can also enumerate over NSDictionary entries using enumerateKeysAndObjectsUsingBlock: [1] and enumerateKeysAndObjectsWithOpt
by joubert 14y ago
You may already know this, but you can also enumerate over NSDictionary entries using enumerateKeysAndObjectsUsingBlock: [1] and enumerateKeysAndObjectsWithOptions:usingBlock: [2].
The latter giving you the ability to enumerate in reverse order or spread the enumeration across multiple cores using Grand Central Dispatch.
[1] https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/nsdictionary_Class/Reference/Reference.html#//apple_ref/occ/instm/NSDictionary/enumerateKeysAndObjectsUsingBlock https://developer.apple.com/library/mac/documentation/Cocoa/...:
[2] https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/nsdictionary_Class/Reference/Reference.html#//apple_ref/occ/instm/NSDictionary/enumerateKeysAndObjectsWithOptions:usingBlock https://developer.apple.com/library/mac/documentation/Cocoa/...:
- robert-boehnke 14y agoIt's exactly what's used internally :)