LayoutKit icon indicating copy to clipboard operation
LayoutKit copied to clipboard

Possible solution for updating UICollectionViewCells with animation

Open spekke opened this issue 7 years ago • 0 comments

Hi, The current solution for updating an UICollectionViewCell using reloadItems with BatchUpdates will dequeue a new cell from UICollectionView and apply the generated views from LayoutArrangement on that cell. This is okay if we are reloading the cell with completely new data. But in my case I just want to update the size of the content and the result is a bit jumpy. :/

I would like the possibility to compute the LayoutArrangements but give back the responsibility to the caller to update the views. In my case I would invalidate the cell context on the UICollectionViewLayout and apply a LayoutKit animation on the cell to update the content.

I know there are no tests included yet. I would like to discuss the solution before spending more time on it.

Thanks

spekke avatar Sep 20 '17 13:09 spekke