UICollectionView with boxes for self-calibration uses to determine the animation

I use UICollectionView with self-calibration cells and set the estimatedItemSize property for this.

However, when performing the removal animation, cells revive their position if they are of the estimatedItemSize size and not their automatic layout (actual).

What's worse is that our cells are variable sizes, and there seems to be no method like UITableView where we can pass an estimated size for each pointer path.

I tried to subclass the layout of the collection view stream and override initialLayoutAttributesForAppearingItemAtIndexPath(_:) and finalLayoutAttributesForDisappearingItemAtIndexPath(_:) , but when checking, the superclass return values ​​for these methods are correct.

Does anyone know of a solution to this seemingly basic error?

+5
source share

All Articles