Skip to content

OfTheWolf/CarouselSection

Repository files navigation

CarouselSection

Carousel implementation with UICollectionViewCompositionalLayout

Usage

private lazy var carouselSection: CarouselSection = {
    CarouselSection(collectionView: collectionView)
}()

private lazy var layout: UICollectionViewLayout = UICollectionViewCompositionalLayout { [weak self] sectionIndex, layoutEnvironment in
    guard let self else { return nil }
    return self.carouselSection.layoutSection()
}

Demo

Demo