Texture
Texture copied to clipboard
reloadRowsAtIndexPaths keep flashing
for index in 0..<100 { tableNode?.reloadRows(at: [IndexPath(row: index, section: 0)], with: .none) }
The table cell will keep flashing, is there any way to solve it?
- (void)reloadRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation
try to use neverShowPlaceholders in your ASCellNode
neverShowPlaceholders = true
You can manually update the layout of the cell without having to reload it.
// put this code in your view controller or where you need to call the update function
myCell.update(with: something)
// put this function inside your cell
class MyCell: ASCellNode { func update(with item: ItemType) { // update your cell's model data and subnodes // ... // when you're done, call this function: transitionLayout(withAnimation: false, shouldMeasureAsync: false, measurementCompletion: nil) } }