I'm sure this is some easy-to-fix issue that I've missed, but I can't figure it out. I've got a grouped table view with 3 sections. I'm using the following code to generate section headers:
-(NSString*)tableView:(UITableView*)tableView titleForHeaderInSection:(NSInteger)section {
if (section == 0) {
NSString *header = @"Header 1";
return header;
}
if (section == 1) {
NSString *header = @"Header 2";
return header;
}
else {
NSString *header = @"Header 3";
return header;
}
}
When my table is displayed, there are two headers for each section - one with white text on a gray bar that stretches across the screen (like the letter separators in the Contacts app), and one in gray text on the table background (which is the one I want). Both headers have identical text. Where is the first header coming from?