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.

CollectionNode fetches all content from NSFetchResultsController #3353

@zboralski

Description

@zboralski

This is the first time I am not using the batch fetching api in a collection node or table node. I can't figure out how to prevent all the cells from being loaded right away. I tried to implement constrainedSizeForItem as I supposed that the cellnodes are being accessed to compute their size:

extension ContactsCollectionNode: ASCollectionDelegate {
  func collectionNode(_ collectionNode: ASCollectionNode, constrainedSizeForItemAt indexPath: IndexPath) -> ASSizeRange {
          let width = collectionNode.view.frame.width
          return ASSizeRange(min: CGSize(width: width, height: width),
                             max: CGSize(width: width, height: width))  }
}

Using a TableViewController.... my cells are loaded only as I scroll down.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions