I'me using this code to add a footer to the TableView. It has 20 sections, and each section a few rows. There's a titleForHeaderInSection, and sectionForSectionIndexTitle methods.
CGRect footerRect = CGRectMake(0, 0, 320, 40);
UILabel *tableFooter = [[UILabel alloc] initWithFrame:footerRect];
tableFooter.textColor = [UIColor blueColor];
tableFooter.backgroundColor = [self.theTable backgroundColor];
tableFooter.opaque = YES;
tableFooter.font = [UIFont boldSystemFontOfSize:15];
tableFooter.text = @"test";
self.theTable.tableFooterView = tableFooter;
[tableFooter release];
What am I doing wrong?
thanks,
RL
I'm specifically seeing in my code that
self.theTable.tableFooterView = tableFooter;
works and
[self.theTable.tableFooterView addSubview:tableFooter];
does not work. So stick to the former and look elsewhere for the possible bug. HTH