Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.
This repository was archived by the owner on Feb 2, 2023. It is now read-only.

[ASCollectionView] Consistency issue when changing number / layout of supplementary nodes #1278

@bsmith11

Description

@bsmith11

I have an ASCollectionView that displays a grid of items. I am using supplementary nodes as item separators as shown in the following screenshot.

simulator screen shot feb 25 2016 6 09 12 pm

I am using a custom UICollectionViewLayout that also serves as the .layoutInspector object via ASCollectionViewLayoutInspecting. I'm getting some crashes when, after the collection view has already loaded and completed layout, I add more items which causes my layout to generate more supplementary nodes (a new column has been created, so an additional separator needs to be created as well). The crash is telling me that Supplementary node should exist., which I assume means that the layoutInspector didn't know that a supplementary node was supposed to be created, so an additional one wasn't.

After some digging, it looks like public func collectionView(collectionView: ASCollectionView!, supplementaryNodesOfKind kind: String!, inSection section: UInt) -> UInt is not getting called again after I make updates to the collection view (via performBatchUpdates). It looks like it needs to be getting called in - (void)willReloadData of the ASCollectionDataController, but it isn't.

Am I using all of these components correctly? Is my implementation possible?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions