the ASTableNode just jump to the top after the insertion
The insertion code like below, I try to scroll after insertion, in demo seems ok, but my project got a much more complicated cell & safeAreaInset, its totally disaster
// Table scroll to the top after insert
self.tableNode.insertRows(at: newIndexPaths, with: .none)
// This workaround looks ok just because the cell is simple in layout & rendering
self.tableNode.performBatch(animated: false, updates: {
self.tableNode.insertRows(at: newIndexPaths, with: .none)
}, completion: { (finished) in
self.tableNode.scrollToRow(at: newIndexPaths.last!, at: .top, animated: false)
})
AsdkDEMO.zip
Very simple demo
ASTableNode
just jump to the top after the insertionThe insertion code like below, I try to scroll after insertion, in demo seems ok, but my project got a much more complicated cell & safeAreaInset, its totally disaster