I want to display the sections in a UITableView different from the built-in behaviour, with images as the section header and footer. What is the best way of achieving this?
+1
A:
implement those UITableView-delegate methods:
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
You can even mix custom and standard headers, if you return nil in tableView:viewForHeaderInSection: the tableView will use the standard section title if you provide one.
fluchtpunkt
2010-10-13 10:02:25