ios - Travel through NSArray without using loop but cursors? -


i have nsarray objects inside (cllocation). can have 50, 100, 300 or more objects inside. in fact, array used while user walking , can follow direction. user can start @ middle of nsarray, know mean ?

well, have loop time array know user compare locations in array.

my question is: possible use thing in java "cursor" in list, , call "next object" travel in array instead of loop ?

because need user walk on location of array. example:

  1. count of array: 100
  2. user start @ location @ index 34 (the nearest location found)
  3. the user must 35, 36, 37... 100 , 0,1,2,3 ... until 33.

hope it's clear, don't know how without using loop...

thank , suggestions!

regards, lapinou.

what wrong loop? iterator typically used on lists, because can't access elements in list index. working array, don't need iterator, rather clever way of accessing array in desired order. maybe code can provide ideas. run 34 100, start 0 , go 33.

for (int = 34; < 134; i++) {     int ix = % 100;     id whatever = arr[ix]; } 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -