CBTableViewDataSource icon indicating copy to clipboard operation
CBTableViewDataSource copied to clipboard

How to add a header for section

Open zcgong opened this issue 8 years ago • 3 comments

when I use this , I try to add a header view for a section, but it just works for the first section.How to add it to other sections ?

zcgong avatar Jun 17 '16 09:06 zcgong

The framework did not support this yet,I will add it as soon as possible. Thanks for your advice.

cocbin avatar Jun 17 '16 11:06 cocbin

I have already dealt with your issue,and make framework able to setting section header and footer. Please download last vision of this framework form github (because i have not update pod vision).

And you can setting section header like this :

 [_tableView cb_makeDataSource:^(CBTableViewDataSourceMaker * make) {
            [make makeSection:^(CBTableViewSectionMaker * section) {
                section.cell(...)
                        .data(...)
                        .adapter(...)
                        .height(...)
                        .headerView(^(){
                            UIView * view = [[UIView alloc] initWithFrame:CGRectMake(0,0,320,100)];
                            view.backgroundColor = [UIColor redColor];
                            return view;
                        });
            }];
}];

cocbin avatar Jun 17 '16 12:06 cocbin

Thanks! The framework is so helpful to me.

zcgong avatar Jun 20 '16 01:06 zcgong