Download Latest Version 1.0.1 source code.tar.gz (19.5 MB)
Email in envelope

Get an email when there's a new version of CHTCollectionViewWaterfallLayout

Home / 1.0.0
Name Modified Size InfoDownloads / Week
Parent folder
1.0.0 source code.tar.gz 2026-03-14 19.5 MB
1.0.0 source code.zip 2026-03-14 19.6 MB
README.md 2026-03-14 2.7 kB
Totals: 3 Items   39.1 MB 0

1.0.0

A major release with a full rewrite of the Swift implementation. The Objective-C implementation is unchanged.

Highlights

  • Swift rewrite — The entire Swift source has been rewritten from scratch to align with the Objective-C reference implementation, following modern Swift conventions.
  • Platform bump — Minimum deployment target is now iOS 13 / tvOS 13.
  • Apple-style documentation — Every public member now has full DocC-compatible documentation comments.

New Features

  • headerInset / footerInset properties — Control margins around section headers and footers independently.
  • minimumContentHeight property — Set a minimum content height for the collection view (useful for hidden headers with no content).
  • Delegate methodsinsetsForHeaderIn:, insetsForFooterIn:, minimumColumnSpacingFor: for per-section customization.

Improvements

  • All property setters now skip invalidateLayout() when the value hasn't changed.
  • Replaced deprecated UIScreen.main.scale with traitCollection.displayScale for pixel-alignment calculations.
  • layoutAttributesForSupplementaryView(ofKind:at:) now accepts both CHTCollectionElementKind* and UICollectionView.elementKindSection* strings.
  • layoutAttributesForElements(in:) deduplicates attributes by index path, preventing potential duplicates.
  • Eliminated all force-unwraps of collectionView! — the layout now returns early safely when collectionView is nil.
  • Union rects optimization now uses a proper union of all rects in each batch, not just the first and last.
  • Demo projects modernized with programmatic UI and UIScene lifecycle (storyboards removed).
  • CI updated to Node.js 24 compatible GitHub Actions.

Breaking Changes

See the migration guide in the README for full details. Summary:

  • Deployment target: iOS 9 → iOS 13, tvOS 9 → tvOS 13.
  • Swift toolchain: swift-tools-version 5.0 → 5.9 (requires Xcode 15+).
  • Supplementary view element kind: Headers/footers now use CHTCollectionElementKindSectionHeader/Footer instead of UICollectionView.elementKindSectionHeader/Footer.
  • Return type: layoutAttributesForSupplementaryView(ofKind:at:) now returns UICollectionViewLayoutAttributes? (optional).
  • Removed: Public delegate property (now private).
  • Removed: All @available(*, unavailable, renamed:) migration shims from 0.9.x.

Note on CocoaPods

CocoaPods is no longer actively maintained. We recommend migrating to Swift Package Manager.

Source: README.md, updated 2026-03-14