kishikawakatsumi / IBPCollectionViewCompositionalLayout

Backport of UICollectionViewCompositionalLayout to earlier iOS 12
MIT License
1.55k stars 148 forks source link

Fix item size calculation inside layoutGroup #126

Closed ichiko closed 4 years ago

ichiko commented 4 years ago

close #125

I think itemSize should not ignore effectiveSizeForContainer.

https://github.com/kishikawakatsumi/IBPCollectionViewCompositionalLayout/blob/master/Sources/IBPCollectionViewCompositionalLayout/IBPCollectionCompositionalLayoutSolver.m#L108

CGSize itemSize = [item.layoutSize effectiveSizeForContainer:container];

At least this changes work well reproduction code https://github.com/ichiko/IBPCVCLLayoutGroupContentInsetsBug

kishikawakatsumi commented 4 years ago

@ichiko This change breaks existing behavior (Run example app and see AdaptiveSectionsViewController).

This PR cannot be merged as-is. I will investigate the correct solution.

Simulator Screen Shot - iPhone Xs - 2019-11-01 at 23 23 18

ichiko commented 4 years ago

Sorry I missed checking all examples.Thank you for your investigating.