Open phonix-dev opened 2 years ago
I figured out the issue, for anyone else needing help regarding this topic, Here's the what fixed the bug for me: external documentation provided this initialization format for UICollectionView
public var collectionView: UICollectionView = {
return UICollectionView(
frame: .zero,
collectionViewLayout: UICollectionViewFlowLayout()
)
}()
It was hard to catch this error because this worked normally until i had to cut and divide my code piece by piece to trace inconsistencies with a test project that worked. (I do not know why this didn't work because it seems like the standard procedure in initializing views) I referred to a direct method of initializing UICollectionView
public var collectionView = UICollectionView(
frame: .zero,
collectionViewLayout: UICollectionViewFlowLayout()
)
and that worked for me.
Also your adapter should be a class property incase you missed that, that could be a possible bug Please refer to link for more info on the bug related to "adapter and class property"
New issue checklist
README
and documentationGeneral information
IGListKit
version:Debug information
I'm still having a weird bug. Everything compiles and runs but CellForItem(at index: Int) && sizeForItem(at index: Int) aren't working within ListSectionControllers. I put breakpoints on numberOfItems() function and can see that is working but the rest are not responding