Strange issue with Indexed UITableView's section index title is incorrect

I ran into a strange issue with my indexed tableview's section index titles. The index titles returned is correct (A - Z) as outputted by the debugging code below but the displayed index titles on the right side of the table is separated with • instead. So instead of ABC D... I get A • C • E •... instead.

Any idea what's causing this? I have another tableview in my app but that tableview doesn't suffer from this problem but I haven't figured out why yet.

- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView {

 NSMutableArray *sectionTitles = [[[NSMutableArray alloc] init] autorelease];
 [sectionTitles addObject:UITableViewIndexSearch];
 [sectionTitles addObjectsFromArray:[self.fetchedResultsController sectionIndexTitles]];

        // NSArray *debug = [self.fetchedResultsController sectionIndexTitles];
        // CFShow(debug);
 return sectionTitles;
}

This is caused when the height available to display the index is less than what is needed to display each letter. The index is abbreviated (or shrunk). This effect will also occur when the keyboard is displayed and the index is still visible.

链接地址: http://www.djcxy.com/p/66860.html

上一篇: xcode 4.5 iOS Storyboard和UITableView代表混淆

下一篇: 索引UITableView的节索引标题奇怪的问题是不正确的