https://github.com/benemdon/centeredcollectionview
A lightweight UICollectionViewLayout that 'pages' and centers its cells 🎡 written in Swift
https://github.com/benemdon/centeredcollectionview
carousel carthage center cocoapods ios spm swift tvos uicollectionview uicollectionviewflowlayout uicollectionviewlayout
Last synced: 3 months ago
JSON representation
A lightweight UICollectionViewLayout that 'pages' and centers its cells 🎡 written in Swift
- Host: GitHub
- URL: https://github.com/benemdon/centeredcollectionview
- Owner: BenEmdon
- License: mit
- Created: 2016-09-03T00:42:11.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2021-01-20T08:28:57.000Z (over 4 years ago)
- Last Synced: 2025-04-04T09:12:38.259Z (3 months ago)
- Topics: carousel, carthage, center, cocoapods, ios, spm, swift, tvos, uicollectionview, uicollectionviewflowlayout, uicollectionviewlayout
- Language: Swift
- Homepage:
- Size: 22.1 MB
- Stars: 1,406
- Watchers: 22
- Forks: 111
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# CenteredCollectionView
[](https://travis-ci.org/BenEmdon/CenteredCollectionView)
[](http://cocoapods.org/pods/CenteredCollectionView)
[](https://github.com/Carthage/Carthage)
[](https://github.com/apple/swift-package-manager)
[](https://swift.org)
[](http://cocoapods.org/pods/CenteredCollectionView)`CenteredCollectionView` is a lightweight drop in place `UICollectionViewFlowLayout` that _pages_ and keeps its cells centered, resulting in the _"carousel effect"_ 🎡
## Example

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](https://swift.org/package-manager/), [CocoaPods](http://cocoapods.org) and [Carthage](https://github.com/Carthage/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`](/USAGE.md)## API
Checkout [`API.md`](/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 👨💻](https://twitter.com/BenEmdon)
## License
CenteredCollectionView is available under the MIT license. See the LICENSE file for more info.