i have problem sorting the arrays.i have two problems.
1.Sorting rightArray with the following code is not working.
2.i also have a leftArray whose indexes should be changed comparing to the right Array,when right array is sorted.Is it possible?.
NSArray *rightArray = [[NSArray alloc] initWithObjects:[mutArray objectsAtIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, 11)]], nil];
NSArray *sortedArray = [rightArray sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];
NSLog(@"%@",sortedArray);
Output:after i sorted using the above code
2012-10-25 19:11:44.571 Converter[3511:207] (
(
USD,
EUR,
GBP,
JPY,
CAD,
AUD,
INR,
CHF,
CNY,
KWD,
SGD
)
)
Your strings are in an array in your array. Get the only object in
rightArrayand sort it.edit
For the second question you can use an intermediate data structure