chiahsien/CHTCollectionViewWaterfallLayout — 4.6k★ trên GitHub (Objective-C). The waterfall (i.e., Pinterest-like) layout for UICollectionView.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
CHTCollectionViewWaterfallLayout is a subclass of UICollectionViewLayout, and it tries to imitate UICollectionViewFlowLayout's usage as much as possible.
This layout is inspired by Pinterest.
Screenshots
Features
Easy to use, it tries to imitate UICollectionViewFlowLayout's usage as much as possible.
Highly customizable.
Outstanding performance, try 10,000+ items and see the smoothness for yourself.
Support header and footer views.
Different column counts in different sections.
Requirements
iOS 13+ / tvOS 13+
Swift 5.0+ or Objective-C
How to Install
Swift Package Manager (Recommended)
Add it to the dependencies value of your Package.swift:
Note: CocoaPods trunk will become read-only on December 2, 2026 and no new versions will be published after that date. We recommend migrating to Swift Package Manager.
Add the following to your Podfile:
pod 'CHTCollectionViewWaterfallLayout' # Swift (default)
pod 'CHTCollectionViewWaterfallLayout/ObjC' # Objective-C
Manual
Copy CHTCollectionViewWaterfallLayout.swift (Swift) or CHTCollectionViewWaterfallLayout.h/.m (Objective-C) to your project.
Migrating to v1.0.0
v1.0.0 includes a full rewrite of the Swift implementation. The Objective-C implementation is unchanged. If you are using the Swift version, please review the following breaking changes.
Deployment Target
The minimum deployment target is now iOS 13 / tvOS 13 (was iOS 9 / tvOS 9). Projects targeting earlier versions cannot adopt this release.
Swift Toolchain
swift-tools-version is now 5.9 (was 5.0). Xcode 15+ is required to resolve this package via SPM.
Supplementary View Element Kind
Headers and footers are now created with custom element kind strings (CHTCollectionElementKindSectionHeader / CHTCollectionElementKindSectionFooter) to match the Objective-C implementation. In 0.9.x these constants were marked @available(*, unavailable) and redirected to UICollectionView.elementKindSectionHeader/Footer.
If you register supplementary views, update the element kind:
// Before (0.9.x)
collectionView.register(HeaderView.self,
forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader,
withReuseIdentifier: "Header")
// After (1.0.0)
collectionView.register(HeaderView.self,
forSupplementaryViewOfKind: CHTCollectionElementKindSectionHeader,
withReuseIdentifier: "Header")
layoutAttributesForSupplementaryView(ofKind:at:) accepts both variants, so layout queries work either way. But layoutAttributesForElements(in:) returns attributes with the CHT-prefixed kind, so any code filtering by representedElementKind must match accordingly.
Return Type Change
layoutAttributesForSupplementaryView(ofKind:at:) now returns UICollectionViewLayoutAttributes? (optional) instead of a non-optional value. It returns nil for unknown element kinds instead of an empty attributes object.
Removed Public delegate Property
The delegate computed property is now private. Access the delegate through collectionView.delegate instead.
Removed Migration Shims
The following @available(*, unavailable, renamed:) declarations from 0.9.x have been removed. If your code still references the old names, rename them:
All have sensible defaults and do not require adoption.
How to Use
Both Swift and Objective-C demo projects are included in the Demo/ directory. Read the demo code and the source headers for more information.
Step 1: Configure the Layout
Below are the properties available for customizing the layout. Although they have default values, it is strongly recommended to set at least columnCount to suit your needs.
The itemRenderDirection property controls the order in which items are rendered in subsequent rows: left-to-right, right-to-left, or shortest column first.
Your collection view's delegate (typically your view controller) must conform to CHTCollectionViewDelegateWaterfallLayout and implement the required method. Return the original size of each item:
Please let me know if your app is using this library. I'm glad to put your app on the list :-)
F3PiX
F3PiX is a series of apps which gives you a concise, curated collection of pictures by professional (Dutch) photographers according to a specific theme. You can use the pictures freely for your own work.
GroupMe for iOS
GroupMe - A Home for All the Groups in Your Life.
Flickr
Access and organize your photos from anywhere.
Tumblr
Post whatever you want to your Tumblr. Follow other people who are doing the same. You'll probably never be bored again.
Funliday
The best trip planning app in the world!
Imgur
Funny GIFs, Memes, and Images!
DealPad
DealPad gives you access to the UK's hottest Deals, Voucher Codes and Freebies in the palm of your hand.
Teespring Shopping
Browse and purchase shirts, mugs, totes and more!
License
CHTCollectionViewWaterfallLayout is available under the MIT license. See the LICENSE file for more info.
chiahsien/CHTCollectionViewWaterfallLayout có bao nhiêu sao?
chiahsien/CHTCollectionViewWaterfallLayout có 4.6k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/chiahsien/CHTCollectionViewWaterfallLayout. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
chiahsien/CHTCollectionViewWaterfallLayout có phải mã nguồn mở không?
Có — chiahsien/CHTCollectionViewWaterfallLayout phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/chiahsien/CHTCollectionViewWaterfallLayout.
chiahsien/CHTCollectionViewWaterfallLayout còn đang phát triển không?
Commit gần nhất trên chiahsien/CHTCollectionViewWaterfallLayout là 8 tháng trước (theo timestamp GitHub). Repo có 686 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
chiahsien/CHTCollectionViewWaterfallLayout dùng license gì?
chiahsien/CHTCollectionViewWaterfallLayout phát hành theo license MIT. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
chiahsien/CHTCollectionViewWaterfallLayout là gì?
chiahsien/CHTCollectionViewWaterfallLayout (chiahsien/CHTCollectionViewWaterfallLayout) là dự án Objective-C trên GitHub. Theo mô tả gốc: The waterfall (i.e., Pinterest-like) layout for UICollectionView.
chiahsien/CHTCollectionViewWaterfallLayout viết bằng ngôn ngữ gì?
chiahsien/CHTCollectionViewWaterfallLayout chủ yếu viết bằng Objective-C. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc thêm về chiahsien/CHTCollectionViewWaterfallLayout ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/chiahsien/CHTCollectionViewWaterfallLayout là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về CHTCollectionViewWaterfallLayout?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về CHTCollectionViewWaterfallLayout.