0

I have an array of managedobjects. Each has a title (name). I want to sort these NOT alphabetically, but by the one that matches a certain string the closest (the search query)

How would I do this?

Thanks

William Falcon
  • 9,813
  • 14
  • 67
  • 110

1 Answers1

1

It's probably best if you define your "closest" match function and simply assign closeness values to these objects (comparing to the search query) and sort by that instead.

Jesus Ramos
  • 22,940
  • 10
  • 58
  • 88