I have two NSMutableArrays with NSString and NSNumber objects, more specific:
NSMutableArray * points; // NSNumber objects
NSMutableArray * players; //NSString objects
and i need to sort both of them according the objects of points. I try this Order two NSMutableArrays based on one but didn’t help because of NSArray. I need to do this in NSMutableArrays. I sort points using this
NSSortDescriptor *highestToLowest = [NSSortDescriptor sortDescriptorWithKey:@"self" ascending:NO];
[points sortUsingDescriptors:[NSArray arrayWithObject:highestToLowest]];
I think you should introduce a Player Class
Instead of keeping the informations in seperated arrays, you would now have a Player object for each player and keep the point inside. Now put all the players in an array, that you can sort easily.