[UITableView alloc]initWithFrame:CGRectMake(。。。。) style:UITableViewStyleGrouped];
UITableViewStyleGrouped,section的间距由footer和header组成,调整footer和header的大小就可以了。
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
if (section == 0) {
UIView *view = [[UIView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_W, 100)];
//。。。。。。
return view;
}
return nil;
}
-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
return nil;
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
return section == 0 ? 100 : 1;
}
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
return 1;
}