美文网首页
发现tableView的几个属性之间的关系

发现tableView的几个属性之间的关系

作者: xiari1991 | 来源:发表于2017-09-14 20:30 被阅读15次

1.wrapperView的位置和高度
2.contentInset的top
3.contenSize的高度

wrapperView高度的确定:
wrapperViewHeight = tableHeaderViewHeight + cellsHeight +tableFooterViewHeight +contentInsetBottom。但不会超高tableView的高度

wrapperView位置的确定:
在contentInsetTop下面。但是它的坐标origin其实还是(0,0), 因为tableView的bounds.orignin变成了(0, - contentInsetTop)


contentInset的top:
contentInsetTop:当tableView作为导航试图下的第一个子view时,其contentInsetTop会在其基础上加上64。


contenSize的高度确定:
contentSizeHeight = tableHeaderViewHeight + cellsHeight

相关文章

网友评论

      本文标题:发现tableView的几个属性之间的关系

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