README and documentationIGListKit version: Last one.Hello,
Is it possible to use variable height cells with IGListSingleSectionController? Basically I want to use constraints and estimatedSize.
It seems we have to pass a block with the size.
https://instagram.github.io/IGListKit/Classes/IGListSingleSectionController.html#/c:objc(cs)IGListSingleSectionController(im)initWithCellClass:configureBlock:sizeBlock:
But docs don't say more info. Or the sample app.
Thanks a lot.
The sample app shows how to pass the block:
let sizeBlock = { (item: Any, context: IGListCollectionContext?) -> CGSize in
guard let context = context else { return .zero }
return CGSize(width: context.containerSize.width, height: 44)
}
I do not think there is anything here stopping you from calculating the height on a per cell basis? 馃 :)
Thanks @Ricardo1980 !
The size block is only if you want to use the provided IGListSingleSectionController.
Otherwise, in your own custom SectionController, you can provide cell sizes based on index (just like collection view).
https://instagram.github.io/IGListKit/Protocols/IGListSectionType.html#/c:objc(pl)IGListSectionType(im)sizeForItemAtIndex: