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

CollectionNode fetches all content from NSFetchResultsController #3353

Open
zboralski opened this issue Sep 14, 2019 · 0 comments
Open

CollectionNode fetches all content from NSFetchResultsController #3353

zboralski opened this issue Sep 14, 2019 · 0 comments

Comments

@zboralski
Copy link

zboralski commented Sep 14, 2019

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant