I am currently struggling a bit while trying to create a sticky header for collection view using CompostionalLayout. In my collection view, one of the sections needs to scroll horizontally which requires for orthogonalScrollingBehavior of that section to be set to something other than default value (which is .none) This is how I am providing section header for the section:
case .liveEvents:
let supplementaryItemSize = NSCollectionLayoutSize(widthDimension: .fractionalWidth(1), heightDimension: .absolute(Constants.timeFrameHeaderViewHeight))
let supplementaryItem = NSCollectionLayoutBoundarySupplementaryItem(layoutSize: supplementaryItemSize, elementKind: "stickyHeader", alignment: .top)
supplementaryItem.pinToVisibleBounds = true
return supplementaryItem
This is how the final behavior looks like
It seems like the section header disappears after I start scrolling. If I change orthogonalScrollingBehavior of all sections to be .none the result looks like this. The header sticks just fine but the horizontally scrollable section is no longer horizontally scrollable.
Anybody ran into similar issue ?

