chiahsien/chtcollectionviewwaterfalllayout

The waterfall (i.e., Pinterest-like) layout for UICollectionView.

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 43 minutes ago
Type:Library / SDKCategory(s):UI Components & Design SystemsWeb Development
Added to GitGenius on September 15th, 2026
Created on November 22nd, 2012
Open Issues & Pull Requests: 46 (+0)
GitHub issues: Enabled
Number of forks: 689
Total Stargazers: 4,609 (+0)
Total Subscribers: 121 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 31.5 days
Mean response time: 31.5 days
90th percentile: 31.5 days
Tracked items: 1

Most active contributors

Sign in to see contributor activity.

Related repositories by overlapping contributors

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 2
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 298 days
Stale 30+ days: 2
Stale 90+ days: 1

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

CHTCollectionViewWaterfallLayout is a UICollectionViewLayout subclass that implements a waterfall layout for collection views, inspired by Pinterest's design pattern.

The tool solves the problem of displaying items in a multi-column layout where each column fills independently, creating a staggered appearance rather than a grid. It works by subclassing UICollectionViewLayout and mimicking the API of UICollectionViewFlowLayout, making it familiar to developers already working with standard collection view layouts. The implementation prioritizes performance and can handle thousands of items while maintaining smooth scrolling.

Developers should choose this layout when building image galleries, product feeds, or other interfaces that benefit from a Pinterest-style presentation. The tool supports both Swift and Objective-C implementations, with Swift available through Swift Package Manager and both variants installable via CocoaPods or manual file copying. It handles headers and footers, allows different column counts across sections, and is highly customizable. The project does not position itself against alternatives in the README.

The Swift implementation underwent a complete rewrite in version 1.0.0, raising the minimum deployment target to iOS 13 and tvOS 13 and requiring Swift 5.9 with Xcode 15 or later. The rewrite introduced breaking changes to supplementary view element kinds and the return type of layout attribute queries, moving from non-optional to optional returns. The Objective-C implementation remains unchanged from earlier versions. The project removed deprecated migration shims that had been available in the previous release, requiring users to update any code still referencing old API names.