简体   繁体   English

当向下滚动到底部行时,ios UITableView重新加载数据

[英]ios UITableView reloads data when scroll down to bottom rows

I've implemented a pull down to refresh that sits above my UITableView. 我已经在UITableView上方实现了下拉刷新。

However, UITableView also has a default setting where if you push up (to reveal rows at the bottom of the table), it also reloads the table data. 但是,UITableView也具有默认设置,如果您向上推(以显示表底部的行),它也会重新加载表数据。 Since I already have pull down to refresh, I want to disable this. 由于我已经下拉刷新,因此我想禁用它。 How do I do that? 我怎么做?

Thanks! 谢谢!

EDIT: I want to load all the rows of the UITableView at once, not just the visible rows, because I'm not loading too many rows anyway. 编辑:我想一次加载UITableView的所有行,而不仅仅是可见行,因为无论如何我都不会加载太多行。

It's not that it's "reloading" the cells. 不是说它正在“重新加载”细胞。 If they have been dequeued, then they are being loaded. 如果它们已经出队,那么它们将被加载。 If you don't want those cells there, then why do you have them in the first place? 如果您不希望这些单元格在那里,那么为什么要首先放置它们? If you scroll them off the screen they normally get dequeued to improve performance of the tableview. 如果将它们滚动到屏幕之外,通常会使其出队以提高表视图的性能。 If you don't want this behaviour, then you may not want to dequeue your cells, but tableview performance could be drastically affected. 如果您不希望这种行为,那么您可能不希望使单元出队,但是tableview性能可能会受到严重影响。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM