A lightweight UICollectionViewLayout that pages and centers cells for a carousel effect in iOS/tvOS apps.
CenteredCollectionView is a lightweight UICollectionViewLayout subclass for iOS and tvOS that automatically pages and centers collection view cells. It solves the problem of implementing carousel-style interfaces by handling the centering and paging logic, allowing developers to create polished, centered scrolling experiences with minimal code.
iOS and tvOS developers building apps that require horizontally scrolling carousels, image galleries, onboarding flows, or any UI where centered paging is desired.
Developers choose CenteredCollectionView because it's a simple, drop-in solution that eliminates the need to write custom layout math for centering and paging, saving development time while providing a native-feeling carousel effect.
A lightweight UICollectionViewLayout that 'pages' and centers its cells 🎡 written in Swift
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
It automatically pages and centers cells, eliminating the need for manual calculations to achieve a smooth carousel effect, as highlighted in its key features.
Can be installed via SwiftPM, Cocoapods, or Carthage, and used as a direct replacement for UICollectionViewFlowLayout with minimal setup, simplifying implementation.
Supports both iOS and tvOS, allowing developers to create consistent carousel experiences across Apple's platforms without extra effort.
Provides a simple solution for centered paging without unnecessary bloat, keeping the codebase clean and aligned with its philosophy of avoiding over-engineering.
As a subclass of UICollectionViewFlowLayout, it doesn't support newer compositional layout features introduced in iOS 13, which offer more design flexibility and performance optimizations.
Only handles centering and paging; features like infinite scrolling, custom indicators, or advanced animations require additional custom code, increasing development overhead.
Requires iOS 9.0 or higher, making it unsuitable for legacy apps that need to support older iOS versions, as stated in the requirements.