居中集合视图 (CenteredCollectionView)

Build Status Version Carthage compatible SwiftPM compatible Swift 5.0 Platform

CenteredCollectionView 是一个轻量级的、可直接使用的 UICollectionViewFlowLayout,它可以分页并保持单元格居中,从而产生“轮播效果” 🎡

示例

Demo

使用 CocoaPods 尝试示例

pod try CenteredCollectionView

要求

此 Pod 需要 iOS 9.0 或更高的部署目标

安装

CenteredCollectionView 可以通过 Swift Package Manager, CocoaPodsCarthage 安装。

要使用 Swift Package Manager 安装,请在 Xcode 的 Add Package Dependency 助手中添加 URL https://github.com/BenEmdon/CenteredCollectionView;或者添加到您自己的 Package.swift

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

要使用 Cocoapods 安装,请将以下行添加到您的 Podfile

pod "CenteredCollectionView"

要使用 Carthage 安装,请将以下行添加到您的 Cartfile

github "BenEmdon/CenteredCollectionView"

用法

请查看 USAGE.md

API

请查看 API.md

贡献

有任何建议?欢迎所有贡献!

如果您提交 pull request 或 issue,您很可能会得到迅速的响应!

作者

@BenEmdon 👨‍💻

许可证

CenteredCollectionView 根据 MIT 许可证提供。 有关更多信息,请参见 LICENSE 文件。