I had a array how to sort this in descending oder below is the array I need to sort How can I do this ? and below is the code I written
array(
"4.3",
"4.8",
"4.4",
"4.8",
"6.5"
)
NSSortDescriptor *sortDescriptor;
sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"floats" ascending:YES];
NSArray *sortDescriptors = [NSArray arrayWithObject:sortDescriptor];
[sortArray sortUsingDescriptors:sortDescriptors];
NSLog(@"sort array %@",sortArray);