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
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
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.