# njdehoog/NHBalancedFlowLayout

UICollectionViewLayout subclass for displaying items of different sizes in a grid without wasting any visual space. Inspired by: http://www.crispymtn.com/stories/the-algorithm-for-a-perfectly-balanced-photo-gallery

Repository: https://github.com/njdehoog/NHBalancedFlowLayout
Canonical: https://ross.abutalabs.com/products/nhbalancedflowlayout
Language: Objective-C
License: MIT
License Family: permissive
Last push: 2016-02-27T18:16:58+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 4682, "days_push": 3840, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1337, forks 101 (observed 2026-08-28T04:04:25.664142+00:00)

## What it is
A UICollectionViewLayout subclass for iOS that displays items of different sizes in a grid without wasting visual space, using a balanced photo gallery algorithm. It is written in Objective-C and distributed via CocoaPods.

## Use cases
- display photos of different sizes in a balanced grid on iOS
- create a masonry-style photo gallery in a UICollectionView
- avoid wasted space when laying out variable-sized items
- build a perfectly balanced image gallery layout
- show mixed-size thumbnails in a grid without gaps

## When to choose
- you need a space-efficient, balanced grid layout for variable-sized items in an iOS UICollectionView
- you are building a photo gallery on iOS 6/7 with Objective-C

## When to avoid
- you need a maintained library - this project is explicitly no longer maintained
- you are targeting modern iOS with Swift or SwiftUI
- you need layouts beyond balanced photo-grid arrangements

## Facets
- artifact type: library
- maturity: abandoned
- function: ui-components, graphics
- domain: mobile-development, frontend, graphics
- platform: -
- tags: uicollectionviewlayout, photo-gallery, objective-c, grid-layout, cocoapods, ios, mobile, swift

## Member repositories
- njdehoog/NHBalancedFlowLayout (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:25.664142+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:44:03.976825+00:00, confidence not recorded.
  - readme: https://github.com/njdehoog/NHBalancedFlowLayout (fetched 2026-08-28T04:04:25.664142+00:00, sha 006bab74c9b3)
- Data as of 2026-08-30T08:39:29.467469+00:00.
