我有俄语艺术家的数据库。
以下方法显示正确的俄语字母
- (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];
}
节字母是这样的“?”如何解决这个问题?
最佳答案
需要子类 NSFetchedResultsController 来覆盖 - (NSString *)sectionIndexTitleForSectionName:(NSString *)sectionName {
//或获取子串
返回部分名称;
}
关于iphone - NSFetchedResultsController sectionIndexTitles 错误不是英文字母,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10898661/