I have UITableview which has number of items like this
item4
item3
item2
item1
So when the user scrolls scrolls past item4 to the top i want to use func refresh to get item5, item6 and item 7 from core data and insert them to the top of the table view to look like
item7
item6
item5
item4
..
item1
When i do this i want to keep the scroll at item 4.
When i tried doing this and reload the table and scroll to to indexpath of item 4 user can easily notice this as some weird scroll happening. For scrolling to index path i have set the animation bool to false. So
1.Is there a way to add items at index positions -1, -2 and so on or reloading the entire table to only option
OR
2.Is there a way to hold the scroll position even after the table reload (I can identify the last row shown by itemId and get the indexpath of the item while reloading and scroll to that index path but this results in a weird scroll effect even after setting the animation bool to .none)
P.S :I am using swift 3
Thanks for any help in advance