I have multiples tables delegated to a UIViewController. In IOS4 I used the function: (UIView *) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
to change the background of some table header section. In those that do not have sections, I return nil and all works fine.
In IOS5 if I return nil, the system puts one default header section. How do I hide the header section in the tables that I have only one section?
Per the release notes, your UITableViewDelegate
MUST now return 0.0 from tableView:heightForHeaderInSection:
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
return 0.0;
}
Seems like a real pain. I don't know why they changed this, as everyone relies on the prior behavior - but they must have their reasons.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With