Does fast enumeration in Objective-C guarantee the order of iteration?

Posted by Ranking Stackingblocks on Stack Overflow See other posts from Stack Overflow or by Ranking Stackingblocks
Published on 2010-05-06T00:12:08Z Indexed on 2010/05/06 0:18 UTC
Read the original article Hit count: 219

Can I expect it to go from the start of an array to the end in order? Can't find anything in the docs about this.

i.e. is

for (id val in array)
{
   NSLog(@"%@", val);
}

always going to print out the same as

for (int i = 0; i < [array count]; ++i)
{
   NSLog(@"%@", [array objectAtIndex:i]);
}

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about fast-enumeration