Closed SogoGolf closed 5 years ago
Hi @SogoGolf, Sorry I was out for a bit, but this looks to be a general dequeueing issue. If you are setting the cell color in the dataSource, you'll need to also reset the color in the cell for reuse. e.g.
prepareForReuse() {
self.backgroundView!.backgroundColor = .white
}
Let me know if this isn't the problem you're running into.
Thanks @nlampi I'll take a look at and let you know
we'd like to be able to set the background color of just specific cells in the grid. for example: row index 4, column index 3 = .green (background color of cell) row index 4, column index 16 = .red (background color of cell)
At the moment either we've not set the property correctly, or there perhaps there is a bug with cell recycling.
for example, in the data source
cellAtIndexPath
method there is this attempt:The grid in question has 22 columns.
If you scroll all the way to the right, the last column in the grid also has a yellow background.
If you scroll back to the left, the originally highlighted column is no longer highlighted, and instead a different column is highlighted. It seems like the cell recycling isn't working correctly for this use case however we may also not have set things up correctly in code.
How should we set things up so that we can achieve this ? eg. Should something be done with the
PrettyRowCell
?Appreciate your help with this.