我有俄语版俄语名字的艺术家数据库 以下方法显示正确的俄语字母
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
id <NSFetchedResultsSectionInfo> sectionInfo = [[self.fetchedResultsController sections] objectAtIndex:section];
return [sectionInfo name];
}
但是当我想要显示索引行时:
- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView {
return [self.fetchedResultsController sectionIndexTitles];
}
部分字母就像这样“?”如何解决这个问题?
答案 0 :(得分:4)
需要子类NSFetchedResultsController来覆盖- (NSString *)sectionIndexTitleForSectionName:(NSString *)sectionName {
//or get substring
return sectionName;
}