分隔符是否有助于UITableView的总高度? [英] Does the separator contribute to the total height of an UITableView?
本文介绍了分隔符是否有助于UITableView的总高度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我有1000行,单行分隔符会使表格视图的高度更大吗?还是仅在单元格上覆盖?
If I had 1000 rows, would a single-line separator make the table view bigger in height? Or is it an overlay on a cell only?
推荐答案
我已经制作了简单的测试应用程序-创建了具有1000行的UITableView并手动设置了其内容偏移量:
I've made simple test application - created UITableView with 1000 rows and manually set its content offset:
- (void) viewWillAppear:(BOOL)animated{
[table reloadData];
[table setContentOffset:CGPointMake(0, 44*500) animated:NO]; // rowHeight equals 44
}
带有和不带有行分隔符的表格视图均滚动到相同位置.因此,似乎行分隔符不会影响表的内容大小.
Both with and without line separator table view scrolled to the same position. So it seems that line separator does not affect table's content size.
这篇关于分隔符是否有助于UITableView的总高度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文