¡@

Home 

2014/10/15 ¤U¤È 10:05:20

iphone Programming Glossary: compareobject

Custom sorting with NSFetchedResultController (subclassing NSSortDescriptor)

http://stackoverflow.com/questions/4106184/custom-sorting-with-nsfetchedresultcontroller-subclassing-nssortdescriptor

ascending selector is not possible see here I tried to use a NSSortDescriptor derived class in order to override the compareObject toObject message. My problem is that the compareObject toObject is not always called. It seems that it is called only when.. use a NSSortDescriptor derived class in order to override the compareObject toObject message. My problem is that the compareObject toObject is not always called. It seems that it is called only when the data are already in memory. There is an optimization.. the data are already in memory. There is an optimization of some sort that use a database based sort instead of the compareObject toObject when the data are retrieved from the store the first time. see here . My question is how to force NSFetchedResultscontroller..