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
  • 704,970
  • 168
  • 1,303
  • 1,425
abegehr
  • 331
  • 4
  • 12
  • 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

2 Answers2

4

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

Chuck
  • 228,856
  • 29
  • 291
  • 386
1

This question has a lot of very good answers about this.

Community
  • 1
  • 1
fzwo
  • 9,802
  • 3
  • 36
  • 57