tableView的内容包括:
- 1.cell
- 2.tableHeaderView/tableFooterView
- 3.sectionHeader/sectionFooter
细节属性:
-
contentSize.height:所有内容的总高度
-
contentInset:在内容周围额外增加的间距(内边距),始终贴着内容
-
contentOffset:内容距离frame矩形框,偏移了多少
-
frame:以父控件内容的左上角为坐标原点(0,0)
-
bounds:以自己内容的左上角为坐标原点(0,0)
-
contentOffset.y = frame顶部 和contentSize顶部的差值
![](https://img.haomeiwen.com/i3407530/399dc9ea0104ef20.png)
![](https://img.haomeiwen.com/i3407530/5de980de269933a3.png)
网友评论