开发者

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

开发者 https://www.devze.com 2022-12-21 11:51 出处:网络
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 ...

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 ...

开发者_JAVA百科

thanks,

m.

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


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:


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号