How to sort an array of an array of objects by those objects attributes
If have an NSMutableArray foo of an NSMutableArray bar of objects. Each of the objects have a property that is a numerical value. In each NSMutableArray bar I want to sum this numerical property of each object. Then I want to sort the NSMutableArray foo by this sum. What's a good way to do this开发者_如何学Python?
Take a look at NSSortDescriptor.
精彩评论