In the first draft of my app, I filled my NSTableView with a static array.
I had a NSButton, which inserts a new row with an animation effect like this:
tableView.beginUpdates()
tableView.insertRows(at: IndexSet(integer: tableview.numberOfRows), withAnimation: .effectFade)
tableView.endUpdates()
tableView.insertRows(at: IndexSet(integer: tableview.numberOfRows), withAnimation: .effectFade)
Short question: You don't need beginUpdates() / endUpdates()
for a single insert/delete/move operation, it's only needed for multiple simultaneous operations.
Primary problem: reloadData()
doesn't show any animation. Instead of ...fetch all data again and reload my TableView insert the object in the table view with insertRows(at
. It updates the table view showing the animation.