GitPedia

CenteredCollectionView

A lightweight UICollectionViewLayout that 'pages' and centers its cells ๐ŸŽก written in Swift

From BenEmdonยทUpdated June 19, 2026ยทView on GitHubยท

`CenteredCollectionView` is a lightweight drop in place `UICollectionViewFlowLayout` that _pages_ and keeps its cells centered, resulting in the _"carousel effect"_ ๐ŸŽก The project is written primarily in Swift, distributed under the MIT License license, first published in 2016. It has gained significant community traction with 1,482 stars and 112 forks on GitHub. Key topics include: carousel, carthage, center, cocoapods, ios.

Latest release: 2.2.2โ€” SPM Release
January 26, 2020View Changelog โ†’

CenteredCollectionView

Build Status
Version
Carthage compatible
SwiftPM compatible
Swift 5.0
Platform

CenteredCollectionView is a lightweight drop in place UICollectionViewFlowLayout that pages and keeps its cells centered, resulting in the "carousel effect" ๐ŸŽก

Example

Demo

To try the example using Cocoapods:

bash
pod try CenteredCollectionView

Requirements

This pod requires a deployment target of iOS 9.0 or greater

Installation

CenteredCollectionView is available through Swift Package Manager, CocoaPods and Carthage.

To install it with Swift Package Manager, add the URL https://github.com/BenEmdon/CenteredCollectionView in Xcode Add Package Dependency assistant ; or add to your own Package.swift:

swift
dependencies: [ .package(url: "https://github.com/BenEmdon/CenteredCollectionView", from: "2.2.2") ]

To install it with Cocoapods, add the following line to your Podfile:

ruby
pod "CenteredCollectionView"

To install it with Carthage, add the following line to your Cartfile:

github "BenEmdon/CenteredCollectionView"

Usage

Checkout USAGE.md

API

Checkout API.md

Contributing

Have a suggestion? All contributions are welcome!

If you make a pull request or an issue, you're likely to get a swift response!

Author

@BenEmdon ๐Ÿ‘จโ€๐Ÿ’ป

License

CenteredCollectionView is available under the MIT license. See the LICENSE file for more info.

Contributors

Showing top 11 contributors by commit count.

View all contributors on GitHub โ†’

This article is auto-generated from BenEmdon/CenteredCollectionView via the GitHub API.Last fetched: 6/22/2026