首页 > 其他 > 详细

UITableView设置Section间距

时间:2016-07-22 14:38:00      阅读:220      评论:0      收藏:0      [点我收藏+]

//section头部间距
- (CGFloat)tableView:(UITableView )tableView heightForHeaderInSection:(NSInteger)section
{
return 1;//section头部高度
}
//section头部视图
- (UIView
)tableView:(UITableView )tableView viewForHeaderInSection:(NSInteger)section
{
UIView
view=[[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 1)];
view.backgroundColor = [UIColor clearColor];
return view ;
}
//section底部间距
- (CGFloat)tableView:(UITableView )tableView heightForFooterInSection:(NSInteger)section
{
return 1;
}
//section底部视图
- (UIView
)tableView:(UITableView )tableView viewForFooterInSection:(NSInteger)section
{
UIView
view=[[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 1)];
view.backgroundColor = [UIColor clearColor];
return view;
}

文/代码干货(简书作者)
原文链接:http://www.jianshu.com/p/7364a11e1fc2
著作权归作者所有,转载请联系作者获得授权,并标注“简书作者”。

UITableView设置Section间距

原文:http://www.cnblogs.com/fantasy940155655/p/5694916.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!