I am using a list that can be sorted in various ways, regenerating the UITableView each time the sort-order is changed.
I set the sectionIndex each time the same way, which is:
- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView {
return [NSArray arrayWithObjects:@"•", @"•", @"•", @"•", @"•", @"•", @"•", @"•", @"•", @"•", nil];
}
Trouble is that when after I change the sort order (lets say from country to city name), the index doesn’t work properly anymore.
It almost seems that the index doesn’t recognize that the tableview has a different number of sections.
Any ideas where I might find the right screw for this?
Cheers
See Sergio’s comment:
tableView:sectionForSectionIndexTitle:atIndex?That did it …