I have an NSArray of NSNumber objects that I have successfully sorted in ascending order using the following:
[myArray sortedArrayU
Use the following code to sort Array on the basis of key on which you want to sort tge array (e.g name , code, address,emp_id etc...)
NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"Enter Sort Type" ascending:NO];
NSArray *sortDescriptors = [NSArray arrayWithObject:sortDescriptor];
return [array sortedArrayUsingDescriptors:sortDescriptors];