viewforheader里面 的数据 就在 viewforheader里面 写数据,

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

{

   

    self.sectionHeaderView = [[[UINibnibWithNibName:@"SectionHeaderView"bundle:nil]instantiateWithOwner:selfoptions:nil]objectAtIndex:0];

    if (worksInfoArray.count > 0) {

        WorksInfo *workInfo = [worksInfoArray objectAtIndex:0];

        self.sectionHeaderView.countLabel.text =[NSString stringWithFormat:@"作品列表(%d",workInfo.opusCount];

    }

    returnself.sectionHeaderView;

}

posted @ 2013-09-05 14:32  路在脚下,  阅读(188)  评论(0编辑  收藏  举报