IGListKit icon indicating copy to clipboard operation
IGListKit copied to clipboard

how to reload cells in Embedded collection view using ListCollectionViewLayout

Open Arsalan-circadiatech opened this issue 7 years ago • 2 comments

is there any way to reload cells or whole section using EmbeddedCollectionViewCell using ListCollectionViewLayout . this peice of code isnt reloading cells or sections...?

 let controller = adapter.sectionController(forSection: 0) as! ListSectionController
                 controller.collectionContext?.performBatch(animated: false, updates: { (batchContext) in
                  batchContext.reload(controller)
          })

Info : 'IGListKit','~> 3.4.0' Xcode : 9.4.1, iOS 11

Arsalan-circadiatech avatar Aug 09 '18 14:08 Arsalan-circadiatech

Well need a lot more info to help out here. Reloading only happens when the cells data changes (isEqualToDiffableObject: returns NO). Is your data changing?

A sample project would go a long way to us helping.

Sent with GitHawk

rnystrom avatar Aug 11 '18 23:08 rnystrom

@rnystrom I'm creating brand new structs for the child controllers, and just like the person who opened this issue, my nested controllers are not updating the cells properly, the only way it's working is if I perform a batch update

SolorzanoJose avatar Mar 03 '20 22:03 SolorzanoJose