If I want to sort an array of items alphabetically without the option NSDiacriticInsensitiveSearch I need to use a NSSortDescriptor with comparator
NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"SortTitle" ascending:YES comparator:
^(id obj1, id obj2) {
NSInteger options = NSCaseInsensitiveSearch
| NSNumericSearch // Numbers are compared using numeric value
// | NSDiacriticInsensitiveSearch // Ignores diacritics (â == á == a)
| NSWidthInsensitiveSearch; // Unicode special width is ignored
return [(NSString*)obj1 compare:obj2 options:options];
However such NSSortDescriptor with comparator is not allowed to use in a NSFetchRequest.
Therefore should I sort the results after fetching them from core data? Is this computationally expensive in terms of performance?
thanks