Search code examples
iphoneuitableviewfooter

How I can do this ? Adding exaplanations between sections (of cells)


I want to add explanation between cells.

I'm experimenting with sections, trying to make the cell opaque, without borders, ... but sure it exists a better approach ...

thanks,

m.

alt text


Solution

  • The UITableViewDataSource protocol has two methods of use to you

    - tableView:titleForHeaderInSection:
    – tableView:titleForFooterInSection:
    

    You can use these to add headers and footers around each section to provide description text.

    In UITableViewDelegate you can also modify the views for the headers and footers with

    – tableView:viewForHeaderInSection:
    – tableView:viewForFooterInSection: