ついに私は解決策を得ました、
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
{
//return 172;
if([arrayServ count] == 1)
{
tableService.frame = CGRectMake(5, 20, 310, 40);
}
if([arrayServ count] == 2)
{
tableService.frame = CGRectMake(5, 20, 310, 85);
}
if([arrayServ count] == 3)
{
// return 172;
tableService.frame = CGRectMake(5, 20, 310, 130);
}
if([arrayServ count] == 4)
{
tableService.frame = CGRectMake(5, 20, 310, 175);
}
if([arrayServ count] == 5)
{
tableService.frame = CGRectMake(5, 20, 310, 220);
}
if([arrayServ count] == 6)
{
tableService.frame = CGRectMake(5, 20, 310, 265);
}
if([arrayServ count] == 7)
{
tableService.frame = CGRectMake(5, 20, 310, 310);
}
if([arrayServ count] > 7)
{
tableService.scrollEnabled = TRUE;
}
return 0;
}