TableView has a header and footer, and each section also has tags.
to set the listening and footer of the table (green in my screenshot), do:
[self.tableView setTableHeaderView: headerView]; [self.tableView setTableFooterView: footerView];
for the header and footer for sections (blue), you have to implement
-(UIView *) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
and
-(UIView *) tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section

You can find the code for the program shown on github
source share