Can someone please show me the code for sorting an NSMutableArray? I have the following NSMutableArray:
NSMutableArray *arr = [[NSMutableArray alloc] init];
IMHO, easiest way to sort such array is
[arr sortedArrayUsingDescriptors:@[[NSSortDescriptor sortDescriptorWithKey:@"self.intValue" ascending:YES]]]
If your array contains float values, just change key to self.floatValue or self.doubleValue
self.floatValue
self.doubleValue