Sort/Enumerate an NSArray from somewhere in the middle?
- by Kenny Winker
I have an NSArray, with objects ordered like so:
a
b
c
d
e
f
I would like to enumerate through this array in this order:
c
d
e
f
a
b
i.e. starting at some point that is not the beginning, but hitting all the items.
I imagine this is a matter of sorting first and then enumerating the array, but I'm not sure if that's the best technique... or, frankly, how to sort the array like this.
Edit
Adding details:
These will be relatively small arrays, varying from 3 to 10 objects.
No concurrent access.
I'd like to permanently alter the sort order of the array each time I do this operation.