Blog Archives

Objective-C Quickie – Iterating an NSArray in reverse

Something that’s not immediately obvious, but handy:

for (id obj in [someArray reverseObjectEnumerator])
{
    // do stuff
}
Advertisements