若当前数据库为:
Entity:Person(NSString *sex, NSString *name)
person01("male", "zkey");
person02("female", "overcode");
若用fetchedResultsController以sex属性为分组依据进行查询,
得到的fetchedResultsController.sectionIndexTitles为@["m", "f"],
而不是@["male", "female"]。
原因是[NSFetchedResultsController seconIndexTitles]方法默认返回sectionKeyPath的第一个字符。
但可以重写该方法以返回期望的值。
fetchedResultsController.sectionIndexTitles详解
原文:http://www.cnblogs.com/overcode/p/4431645.html