UA-17470720-3

Jump to content


Photo
- - - - -

SCDataFetchOptions sortDescriptors with Selector


  • Please log in to reply
No replies to this topic

#1 ozie

ozie

    ¯\_(ツ)_/¯

  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 526 posts
  • LocationAustralia
Reputation: 169
Popular

Posted 16 October 2013 - 04:45 PM

like to see the SCDataFetchOptions extend the sorting to use selectors too

from

NSSortDescriptor *descriptor = [NSSortDescriptor sortDescriptorWithKey:key ascending:self.sortAscending];

to 

NSSortDescriptor *descriptor = [NSSortDescriptor sortDescriptorWithKey:key ascending:self.sortAscending selector:@selector(caseInsensitiveCompare:)];
of course caseInsensitiveCompare could be anything else too

 

the way it is currently works ok for numbers and dates, but not strings

AA,AB,ZZ,zz currently sorts as zz,AA,AB,ZZ


  • wizgod and clexLurllef like this

P.S. I hate Swift.. don't talk Swift.. Too old school to learn yet another programming language.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users