kishikawakatsumi/IBPCollectionViewCompositionalLayout

Group. ContentInsets iOS12 in the bottom and the trailing cannot properly

Opened this issue · 3 comments

Hello. By modifying demo, I found that error #100 still exists, and iOS 12 and 13 do not perform consistently. ContentInsets bottom and backward, uncontrollable, you can try running demos and modify the group.contentInsets of AdaptiveSectionsViewController in systems before iOS 13.

group.contentInsets = NSDirectionalEdgeInsets(top: 20, leading: 20, bottom: 20, trailing: 20)

IMG_3B6ACA46EB0B-1
iOS 12.5.2

IMG_F42983650052-1
iOS 14.4.1

IBPCollectionCompositionalLayoutSolver.m line 152
Modify the code
Can fix the problem, but I don't know whether there will be other bugs @kishikawakatsumi
itemSize.width = (CGRectGetWidth(containerFrame)-(group.contentInsets.leading + group.contentInsets.trailing) - interItemFixedSpacing * (group.count - 1)) / group.count;

I confirm the fix proposed by @xixisplit works in the cases I tested with! Thank you.