0

OK, this is my problem:

I have a NSMutableArray (hsdbarray) with objects (highscoresdbObj) in it.

I want to sort the objects in the array by OBJECT.NSNumber (highscoresdbObj.hsdbname) descending.

Could someone please help me?

Sincerly Jonny! :)

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
abegehr
  • 438
  • 5
  • 17
  • 1
    It's unrelated to your problem, but consider using readable names. To my tired eyes after hours of reading, "highscoresdbObj.hsdbname" is about as meaningful as alphabet soup. – Chuck Nov 22 '10 at 21:23

1 Answers1

4

Create an NSSortDescriptor with the key "hsdbname" and descending order. Tell the array to sort using this descriptor.

Chuck
  • 234,037
  • 30
  • 302
  • 389