以前的時候使用viewForHeaderInSection和viewForFooterInSection可以設置header和footer的view的屬性吕喘、顏色等等砸抛,現(xiàn)在發(fā)現(xiàn)失效了,設置后運行的時候不顯示
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
UIView *footerView = [[UIView alloc]initWithFrame:CGRectMake(10, 0, SCREEN_WIDTH - 20, 40)];
return footerView;
}
后來發(fā)現(xiàn)必須指定titleForHeaderInSection或者titleForFooterInSection的字符串才能產(chǎn)生效果蝇刀,即:
- (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section {
return @" ";
}