I'm using s selector (localizedCaseInsensitiveCompare:), but i need also to use the Diacritic selector.
Code:
NSFetchRequest *request = [[NSFetchRequest alloc] init];
request.entity = [NSEntityDescription entityForName:@"CompanyActivity" inManagedObjectContext:context];
request.sortDescriptors = [NSArray arrayWithObject:[NSSortDescriptor sortDescriptorWithKey:descriptionLanguageKey
开发者_JAVA百科 ascending:YES
selector:@selector(localizedCaseInsensitiveCompare:)]];
How can I use both?
Thanks,
RL
You should use UILocalizedIndexedCollation for doing sorting and categorizing entries into sections. The code for implementing this is in the question NSFetchedResultsController v.s. UILocalizedIndexedCollation
The UILocalizedIndexedCollation was built to be able to on a per-language basis categorize words based on the current language settings. Á and à will be put in section A.
精彩评论