项目作者: jjimeno

项目描述 :
A staggered UICollectionView grid layout subclassing UICollectionViewFlowLayout, with configurable columns, multiple sections, section insets, header & footer & dynamic cell size height
高级语言: Swift
项目地址: git://github.com/jjimeno/JJStaggeredGridCollectionView.git
创建时间: 2017-04-10T21:17:18Z
项目社区:https://github.com/jjimeno/JJStaggeredGridCollectionView

开源协议:MIT License

下载


JJStaggeredGridCollectionView

CI Status
Version
License
Platform

Example





To run the example project, clone the repo, and run pod install from the Example directory first.
The example uses getty images API, you need to change the api key for the example to work.

Usage

JJStaggeredGridCollectionViewLayout is a subclass of UICollectionViewFlowLayout.

You can use the following vars of UICollectionViewFlowLayout in JJStaggeredGridCollectionViewLayout:

  1. open var minimumLineSpacing: CGFloat
  2. open var minimumInteritemSpacing: CGFloat
  3. open var scrollDirection: UICollectionViewScrollDirection // default is UICollectionViewScrollDirectionVertical
  4. open var headerReferenceSize: CGSize
  5. open var footerReferenceSize: CGSize
  6. open var sectionInset: UIEdgeInsets

To set the number of columns your layout has, just change

  1. collectionviewLayout.numColumns = 3

Installation

JJStaggeredGridCollectionView is available through CocoaPods. To install
it, simply add the following line to your Podfile:

  1. pod "JJStaggeredGridCollectionView"

License

JJStaggeredGridCollectionView is available under the MIT license. See the LICENSE file for more info.