How to stop unwanted scrolling in a collection view after an invalid layout

I am working on a collection view with dynamic cell height. What happens when I cancel the layout, some cell grows or shrinks in height, which leads to an undesirable bias for viewing the collection.

Currently, I save the visible upper index path before the layout is invalid and scroll the collection view along that pointer path after the layout is invalid, but this leads to a strange, clear flash.

How can I solve this problem?

+4
source share

No one has answered this question yet.


All Articles