UICollectionViewCompositionalLayout collapsing cells during scroll

I'm using a UICollectionViewCompositionalLayout with estimated cell heights and simple UICollectionViewCell items that contain a UILabel. I'm using the common self-sizing AutoLayout pattern with the label anchored to the top and bottom of the contentView.

The collectionView renders correctly when the controller is presented, but when I scroll to the bottom and then scroll back up, the UILabel is collapsed, leaving what looks like a 1px sliver of content. Momentarily swiping up to the home screen and canceling the gesture causes the cell heights to snap to the correct values.

I've tried calling layoutIfNeeded before cells are returned. I've checked prepareForReuse and my AutoLayout code. I've fiddled with various UILabel compression and content hugging priorities and nothing seems to change this behavior.

Anyone experience anything similar or have a suggestion for a fix?

Replies

I am making iOS app, where I have collectionViewCell with compositional pattern.If I scroll gently/slowly from top to bottom then none of cell disappears. But If scroll quickly from top. to bottom then, it makes CollectionViewCell disappear part by part. Its sounds similar to the above. Does anyone have a solution please?