设置UITableView的section之间的距离

来源:互联网 发布:集对分析 知乎 编辑:程序博客网 时间:2024/05/16 08:44

设置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

0 0
原创粉丝点击