Closed HarshilShah closed 7 years ago
@HarshilShah This seems to be a flow layout problem. After setting insets to 10, the width of the section is containerWidth + 10 + 10, which is larger than the width of the collectionView. This is not allowed in UICollectionViewFlowLayout.
@HarshilShah Set
func sizeForItem(at index: Int) -> CGSize {
return CGSize(width: collectionContext!.containerSize.width - 20, height: 55)
}
in SelfSizingSectionController should solve your issue.
20 = inset.left + inset.right
@zhubofei This solved it, thanks!
New issue checklist
README
and documentationGeneral information
IGListKit
version: 2.1.0Self-sizing cell layouts, as shown in the
SelfSizingCellsViewController
example, break when theinset.right
orinset.left
values for the section controller are non-zero.The following console output is shown when
inset.left
is set to10
, instead of the current value of0
, in the exampleSelfSizingSectionController
.[This set of messages is shown a whole bunch of times, presumably for each separate self-sizing view in the controller.]