I want to get the index of the current object when using fast enumeration, i.e.
for (MyClass *entry in savedArray) {
// What is the index of |entry| in |sav
This question has already been answered, but I thought I would add that counting iterations is actually the technique mentioned in the iOS Developer Library documentation:
NSArray *array = <#Get an array#>;
NSUInteger index = 0;
for (id element in array) {
NSLog(@"Element at index %u is: %@", index, element);
index++;
}
I was sure there would be a fancy trick, but I guess not. :)