Trying to get a sticky cell that will orthogonally scroll with the section, but only partially, leaving the trailing end exposed until scrolled backwards. Demo Code: https://developer.apple.com/documentation/uikit/views_and_controls/collection_views/implementing_modern_collection_views (Download the project) Open: Modern Collection Views > Compositional Layout > Advanced layouts View Controllers > OrthogonalScrollBehaviorViewController.swift Replace func createLayout() -> UICollectionViewLayout { ... } With func createLayout() -> UICollectionViewLayout { let config = UICollectionViewCompositionalLayoutConfiguration() config.interSectionSpacing = 20 let layout = UICollectionViewCompositionalLayout(sectionProvider: { (sectionIndex: Int, layoutEnvironment: NSCollectionLayoutEnvironment) -> NSCollectionLayoutSection? in guard let sectionKind = SectionKind(rawValue: sectionIndex) else { fatalError(unknown section kind) } let leadingItem = NSCollectionLayoutItem(layoutSize: NSCollectionLayoutSize(
0
0
1k