views:

39

answers:

2

Hello,

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

+2  A: 

Implement this method in your UITableViewDataSource object

- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section

It allows you to pass back a UIView to be displayed in the header for any given section.

kubi
sorry, I was trying to add the image, now it's there ...
mongeta
I've implemented the viewForHeaderInSection in some apps, now that you mention it, it can be a possibility, I don't know where I have my head today ... thanks
mongeta
+3  A: 

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:
Brandon Bodnár
ok, it was the section footer ...thanks!
mongeta