get the array index in for statement in objective-c

后端 未结 5 1319
生来不讨喜
生来不讨喜 2021-01-14 21:33

I am stuck in a stupid mess...
I want to get not only the value of an array but also the index of the values.
In PHP it\'s simple: foreach($array as $key->$

5条回答
  •  滥情空心
    2021-01-14 22:07

    int arraySize = array.count;
    // No need to calculate count/size always
    for (int i=0; i

提交回复
热议问题