JJStaggeredGridCollectionView 0.2.0

JJStaggeredGridCollectionView 0.2.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release May 2017
SwiftSwift Version 3.0
SPMSupports SPM

Maintained by Jose Jimeno.




  • By
  • jjimeno

JJStaggeredGridCollectionView

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:

open var minimumLineSpacing: CGFloat

open var minimumInteritemSpacing: CGFloat

open var scrollDirection: UICollectionViewScrollDirection // default is UICollectionViewScrollDirectionVertical

open var headerReferenceSize: CGSize

open var footerReferenceSize: CGSize

open var sectionInset: UIEdgeInsets

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

collectionviewLayout.numColumns = 3

Installation

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

pod "JJStaggeredGridCollectionView"

License

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