下面的帖子是否仍然是检测UITableView的示例何时滚动到底部[在Swift中]的公认方法,或者它是否被更改(如:改善)之后?
Problem detecting if UITableView has scrolled to the bottom
谢谢你。
下面的帖子是否仍然是检测UITableView的示例何时滚动到底部[在Swift中]的公认方法,或者它是否被更改(如:改善)之后?
Problem detecting if UITableView has scrolled to the bottom
谢谢你。
5条答案
按热度按时间wlsrxk511#
试试这个:
或者你也可以试试这个方法
uqcuzwp82#
雨燕3
huus2vyu3#
雨燕4
如果实现可扩展的
UITableView/UICollectionView
,则可能需要选中scrollView.contentSize.height >= scrollView.frame.size.height
6mzjoqzu4#
**我们可以避免使用
scrollViewDidScroll
**而使用tableView:willDisplayCell
这应适用于任意数量的节。
bfhwhh0e5#
实际公式:
然后。
但请注意:
https://stackoverflow.com/a/71350599/294884
对于非常动态的表,contentSize可能很棘手并且是实时的。