Let's say i have a firstArray of PFObject[](from Parse SDK), and it has 7 items, i make a secondArray out of firstArray:
secondArray = firstArray
then i call a query to the database to retrieve updated data, they are now 10 items in firstArray.
I do something like this:
if firstArray.count > secondArray.count {
let lastItems = firstArray.count - secondArray.count
// lastItems = 3
}
How do i append those 3 last items to the end of the secondArray in their specific order?
secondArray append item 8
secondArray append item 9
secondArray append item 10
I don't want to reloadData(), i just want to add the last 3 rows to my TableView like WhatsApp does, for example, otherwise the TableView will scroll to the top.
Thanks!