Skip to content
项目

njdehoog/NHBalancedFlowLayout

在 GitHub 查看

关于

用于在网格中展示不同尺寸项目且不浪费任何视觉空间的 UICollectionViewLayout 子类。灵感来自:http://www.crispymtn.com/stories/the-algorithm-for-a-perfectly-balanced-photo-gallery

设计与媒体

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
0
1个月
-1

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

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

This project is no longer maintained. For a more up-to-date version, check out: https://github.com/graetzer/NHBalancedFlowLayout

Notes

  • Tested with iOS 7, but should be compatible with iOS6 as well
  • Works with iPhone and iPad
  • All interface orientations are supported

Screenshots

Installation

The easiest way is to use CocoaPods. If you don't already, here's a guide.

pod 'NHBalancedFlowLayout', '~> 0.2'

If you don't use CocoaPods, you'll need to copy the following files into your project:

  • NHBalancedFlowLayout.h
  • NHBalancedFlowLayout.m
  • NHLinearPartition.h
  • NHLinearPartition.m

Credits

Attributions for the photos in the same order as they appear in the demo:

探索相关项目

加载中…