Post

Replies

Boosts

Views

Activity

UICollectionReuseView created duplicately and cannot removed after insert items on iOS15 beta.
I create my custom UICollectionViewLayout. Before iOS15 beta, it performs all OK. But on iOS15 beta, it has 2 problem: When I insert items sometime, it will create SupplementaryElement duplicately, and cannot be removed after animation. So it will be a lot of same views in the collection view. When I insert an item to the collection view, the animation will create snapshot, and my background SupplementaryElement backgroundColor = [UIColor colorWithWhite:1 alpha:0.3];, then it will be more white during animation, because it contains a background and a snapshot. The demo is here https://github.com/djs66256/NECollectionViewLayout. And the issue is here https://github.com/djs66256/NECollectionViewLayout/issues/1. You can follow the steps: Run the example in iOS15 beta. Goto the insert page. Click the section on the top right, more than 3 times. Scroll to the bottom. Click the item on the top right quickly. Scroll to the top. Then you will see the duplicate reuse views by view hierarchy. Then add more items, the duplicate views can not remove and can not recover. Is a bug of UICollectionView ?
0
0
414
Jul ’21