Thumbprint logo

Carousel

Grouped content that is navigated horizontally

iOS (UIKit) is being deprecated

Thumbprint on iOS is transitioning from UIKit to SwiftUI, and this documentation is no longer being supported. Please refer to the SwiftUI documentation when available.

Summary

CarouselLayout is our custom subclass of UICollectionViewFlowLayout that facilitates creation of single line carousels

Public API

See UICollectionViewFlowLayout

Usage

CarouselLayout can be used to lay out a collection view

import Thumbprint
/* ... */
let carouselLayout = CarouselLayout()
let collectionView = UICollectionView(frame: .zero, collectionViewLayout: carouselLayout)
// Properties can be modified just like a regular UICollectionViewFlowLayout
carouselLayout.sectionInset.bottom = Space.three
carouselLayout.sectionInset.left = Space.four
carouselLayout.sectionInset.right = Space.four