I have a problem using subArrayWithRange.
Basically, what I want to do is to make a subarray of 50 elements or less from mainArray, for example, if mainArray has 70 elements, I want sortedArray to have an array of the first 50 elements in the first index and another array of 20 items in the latest sortedArray index
I hope that I understand what I want to do.
Anyway, my code
for (int i=0; i<=ceilLoopCount; i++) {
[sortedArray insertObject:[testArray subarrayWithRange:NSMakeRange(0,50)] atIndex:i];
}
and the problem I am facing is that I only get 50 elements in the whole array
Please help, Pondd
source
share