开发者

Fast enumeration ordering

开发者 https://www.devze.com 2023-03-10 13:07 出处:网络
Do for (id object in array) { // do something with objec开发者_开发问答t } guarantee to return the objects in the order they are put in the array?It\'s just shorthand for an enumerator. So yes for

Do

for (id object in array) {
    // do something with objec开发者_开发问答t
}

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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消