We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
I see theres some implementation for prefetching API in CollectionDirector however the events are not triggered at all.
CollectionDirector
Setting I tried:
let director = FlowCollectionDirector(collection: collectionView, flowLayout: layout) collectionView.prefetchDataSource = director collectionView.isPrefetchingEnabled = true let adapter = CollectionCellAdapter<ProductItemViewModel, RProductCell> { adapter in adapter.events.dequeue = { context in guard let cell = context.cell else { return } cell.configure(with: context.element) } adapter.events.prefetch = { (items, indexes) in print("$$$$ prefetching") items.forEach { $0.loadIfNeeded() } } adapter.events.itemSize = { _ in let dim = (self.view.bounds.width - (16 + 16 + 10)) / 2 return CGSize(width: dim, height: 338) } } director.registerAdapter(adapter) return director
The text was updated successfully, but these errors were encountered:
#34 Added isPrefetchingEnabled both for CollectionDirector and TableD…
369b96a
…irector
Fixed! Now you can enable prefetching events by setting the isPrefetchingEnabled = true in your CollectionDirector or TableDirector.
isPrefetchingEnabled = true
TableDirector
Sorry, something went wrong.
malcommac
No branches or pull requests
Hello,
I see theres some implementation for prefetching API in
CollectionDirector
however the events are not triggered at all.Setting I tried:
The text was updated successfully, but these errors were encountered: