iOS 设置tableVIew区头区尾高度

2017-06-14  本文已影响0人  花开花非花

- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section

{

//获取indexPath

NSIndexPath *indexPath = [[NSIndexPath alloc]initWithIndex:section];

if (0 == indexPath.section) {//第一组

return 20;

}else

return 15;

}

- (CGFloat)tableView:(UITableView*)tableView heightForFooterInSection:(NSInteger)section{

return 10;//设置尾视图高度

}

上一篇 下一篇

猜你喜欢

热点阅读