Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reloadRowsAtIndexPaths keep flashing #2081

Open
tomtao2022 opened this issue Jun 3, 2023 · 2 comments
Open

reloadRowsAtIndexPaths keep flashing #2081

tomtao2022 opened this issue Jun 3, 2023 · 2 comments

Comments

@tomtao2022
Copy link

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
@berbaspin
Copy link

try to use neverShowPlaceholders in your ASCellNode

neverShowPlaceholders = true

@abbasnaqvi200
Copy link

abbasnaqvi200 commented Aug 14, 2023

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)
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants