美文网首页
iOS 设置tableVIew区头区尾高度

iOS 设置tableVIew区头区尾高度

作者: 花开花非花 | 来源:发表于2017-06-14 15:51 被阅读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;//设置尾视图高度

}

相关文章

网友评论

      本文标题:iOS 设置tableVIew区头区尾高度

      本文链接:https://www.haomeiwen.com/subject/qozsqxtx.html