Custom sorting with NSFetchedResultController (subclassing NSSortDescriptor)
问题 I want to provide custom sorting using NSFetchedResultsController and NSSortDescriptor. As custom sorting via NSSortDescriptor message -(id)initWithKey: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 the data are already in memory. There is an optimization of some sort that use a