swift – iOS 16. UICollectionView `put together(forCollectionViewUpdates updateItems: [UICollectionViewUpdateItem])` not referred to as


I’ve UICollectionViewFlowLayout subclass. put together... not getting referred to as after merchandise deletion but documentation says the alternative (so far as I perceive)

When objects are inserted or deleted, the gathering view notifies its format object in order that it could actually regulate the format as wanted. Step one in that course of is to name this technique to let the format object know what modifications to anticipate. After that, extra calls are made to assemble format info for inserted, deleted, and moved objects which might be going to be animated across the assortment view.

It reproduces when objects are faraway from both “prime” of the record or “backside”

I’d anticipate it to be referred to as each time or am I lacking one thing?

override func put together(forCollectionViewUpdates updateItems: [UICollectionViewUpdateItem]) {
    print(#operate, updateItems) // will get right here solely first time and than every so often, no logic i can hint
    tremendous.put together(forCollectionViewUpdates: updateItems)


Leave a Reply