I’d like to make the backgroundColor of a UITableView‘s section header view transparent. I don’t want to format the text in the header because I like the default formatting. Can I do this with:
-(UIView*) tableView:(UITableView*)tableView
viewForHeaderInSection:(NSInteger)section
without having to format the text in a UILabel? Everything I’ve tried covers up the text in the section header (that I get from tableView:titleForHeaderInSection:) and I don’t know how to format the text myself.
Well, table cells do not have a header.
The
UITableView‘s section header is an independent view.And yes,
is THE table delegate method to implement. It returns a UIView (derivate) that displays the table header.
Make sure that you implement
as well and return the appropriate height for each header. (Probably just a constant value)