Refreshing Table View Efficiently
I think best approach will be pagination. Fetch like 10 or 20 data in the beginning and save it in an array and load tableview. When user starts scrolling the tableview in method willDisplayCell increase page count and fetch next 10 or 20 data from server and append it in the array.
I am using Django as my backend and inside my iOS application , I am fetching data through API's. I have a UITableView where I am fetching a list of places which also have a rating value with them. After implementing the refresh control I noticed that whenever I used to refresh, it used to append the new data in the array and created duplicity. I thought of a very simple solution which is that we can actually empty our array when refreshing so that we can avoid duplicity. Is it the most efficient way to do this? I am concerned because right now I have 3 places in my backend which I am trying to fetch and what about when there will be hundreds , will we have any performance impact ?