Post

Replies

Boosts

Views

Activity

Reply to UICollectionViewCompositionalLayout incorrect item size on iOS 14
Hello, is this issue already solved? I'm facing a similar issue with UICollectionViewCompositionalLayout. When I use an orthogonal scrolling section with items that have a fixed width and an estimated height, they are shown correctly but I can select the items only within the estimated height. Any click outside of the estimated item size is ignored. Also horizontal scrolling does not work. Vertical scrolling seems to trigger some recalculation and then the items are selectable and horizontally scrollable as expected. I'm working in iOS 14.3 SDK and Xcode 12.3 let itemSize = NSCollectionLayoutSize(widthDimension: .fractionalWidth(1.0), heightDimension: .estimated(1.0)) let item = NSCollectionLayoutItem(layoutSize: itemSize) let groupSize = NSCollectionLayoutSize(widthDimension: .absolute(200.0), heightDimension: .estimated(1.0)) let group = NSCollectionLayoutGroup.horizontal(layoutSize: groupSize, subitems: [item]) layoutSection = NSCollectionLayoutSection(group: group) layoutSection.interGroupSpacing = 15.0 layoutSection.orthogonalScrollingBehavior = .continuousGroupLeadingBoundary
Jan ’21