I want to sort my array.... In my array elements are in this order dateArray{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19}
But i want this array in reverse order I used this code for reversing..
dateArray=[[NSMutableArray alloc]initWithArray:[[date reverseObjectEnumerator] allObjects]];
But it gives this output
dateArray=(
9,
8,
7,
6,
5,
4,
3,
2,
19,
18,
17,
16,
15,
14,
13,
12,
11,
10,
1,
0
)
But i want this output dateArray(19,18,17,16,15,14,13,12,11,10........2,1,0) I also used sorting method but output is same. how can i do this??? Please help
EDITED:
My array elements are the contents of NSDocument Directory....
SOLVED this question has been sovled. I don't know the exact way to sort my array as i want but i changed my subpaths name. and it gives right output..
Thanks in Advance