对与ios7.0这四个代理方法都没作用
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
return 1;
}
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
{
return 1;
}
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
UIView *coverView = [[UIView alloc]init];
coverView.backgroundColor = [UIColor clearColor];
coverView.frame = CGRectMake(0, 0,SCREEN_WIDTH , 1);
return coverView;
}
-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
{
UIView *coverView = [[UIView alloc]init];
coverView.backgroundColor = [UIColor clearColor];
coverView.frame = CGRectMake(0, 0,SCREEN_WIDTH , 1);
return coverView;
}
用了
self.tableView.sectionFooterHeight = 5;成功