swift - How many rows an iOS table view should contain when I use pagination? -
i have load news inside table view.
i know have use pagination or lazy loading, because there may thousands of news @ point.
my question is:
if have instance 10000 news, should return number inside:
func tableview(tableview: uitableview, numberofrowsinsection section: int) -> int { return totalnumberofnews }
?
or, maybe should return smaller number, let's 200-300, , whenever user scrolls , down reset offset of table view
i know cells reused, , never keep 10000 cells in memory. wondering if return 10000 or 1 million in method affect performance in way.
thanks in advance!
you use count of news articles you've downloaded. user scrolls down, @ point request more, add them existing news articles, , reload table view sees new count.
Comments
Post a Comment