Is there a simple way to do fast enumeration on a range of objects in an array? Something like…
for (Object *object in myArray startingAtIndex:50) {
//do stuff
}
…to avoid having to do something like this…
for (Object *object in myArray) {
NSUInteger index = [myArray indexOfObject:object];
if (index >= 50) {
//do stuff
}
}
Thanks.
These come to my mind:
Which creates a temporary array though, thus potentially being slower (benchmark it!) than manual enumeration like this: