Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
[ad_1]
I’ve an issue with UICollectionView.
I’ve n sections and ni components in a piece, after I click on on the primary factor within the part, the part expands or collapses. I’ve issues when deleting from a piece, invisible components aren’t animated and are in the long run level instantly.
This occurs in the event you increase class(insert objects to part), scroll up or down, and conceal collapse class(delete objects from part), so far as I discovered, this is because of layoutAttributesForElements.
Lifecycle in UICollectionViewLayout so far as I perceive is that this:
The rect in layoutAttributesForElements are completely different relying on the operation. When increasing a class (inserting components right into a part), the rect in layoutAttributesForElements is the same as (0,0,320,1600) for instance.
When scrolling (0, scrollOffset, 320, 840).
When hiding a class (eradicating components from a piece), the rect in layoutAttributesForElements is (0, 0, 320, 1600)
I am utilizing RxDataSource for diff and default UIColletionViewFlowLayout.
If anybody has encountered such an issue or is aware of why that is taking place, please assist 🙂
[ad_2]