设置UITableView的section之间的距离(本例中设置section之间的距离为20):
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
return 0.0;
}
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
{
return 20.0;
}
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
{
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0,0, 320,20)];
view.backgroundColor = [UIColor clearColor];
return [view autorelease];
}
转载自:http://blog.csdn.net/xumingwei12345/article/details/9664773