Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fast enumeration ordering

Do

for (id object in array) {
    // do something with object
}

guarantee to return the objects in the order they are put in the array?

like image 236
Abhinav Avatar asked Dec 11 '25 09:12

Abhinav


1 Answers

It's just shorthand for an enumerator. So yes for NSArrays, no for NSSets and NSDictionarys

like image 60
Abizern Avatar answered Dec 12 '25 22:12

Abizern