Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jjimeno/jjstaggeredgridcollectionview
A staggered UICollectionView grid layout subclassing UICollectionViewFlowLayout, with configurable columns, multiple sections, section insets, header & footer & dynamic cell size height
https://github.com/jjimeno/jjstaggeredgridcollectionview
staggeredgrid swift3 uicollectionviewflowlayout waterfall
Last synced: about 1 month ago
JSON representation
A staggered UICollectionView grid layout subclassing UICollectionViewFlowLayout, with configurable columns, multiple sections, section insets, header & footer & dynamic cell size height
- Host: GitHub
- URL: https://github.com/jjimeno/jjstaggeredgridcollectionview
- Owner: jjimeno
- License: mit
- Created: 2017-04-10T21:17:18.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-07-02T21:40:31.000Z (over 7 years ago)
- Last Synced: 2024-09-29T22:21:04.079Z (about 2 months ago)
- Topics: staggeredgrid, swift3, uicollectionviewflowlayout, waterfall
- Language: Swift
- Homepage:
- Size: 19.1 MB
- Stars: 28
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# JJStaggeredGridCollectionView
[![CI Status](http://img.shields.io/travis/jjimeno/JJStaggeredGridCollectionView.svg?style=flat)](https://travis-ci.org/jjimeno/JJStaggeredGridCollectionView)
[![Version](https://img.shields.io/cocoapods/v/JJStaggeredGridCollectionView.svg?style=flat)](http://cocoapods.org/pods/JJStaggeredGridCollectionView)
[![License](https://img.shields.io/cocoapods/l/JJStaggeredGridCollectionView.svg?style=flat)](http://cocoapods.org/pods/JJStaggeredGridCollectionView)
[![Platform](https://img.shields.io/cocoapods/p/JJStaggeredGridCollectionView.svg?style=flat)](http://cocoapods.org/pods/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](http://developers.gettyimages.com/), you need to change the api key for the example to work.## Usage
JJStaggeredGridCollectionViewLayout is a subclass of [UICollectionViewFlowLayout](https://developer.apple.com/reference/uikit/uicollectionviewflowlayout).You can use the following vars of UICollectionViewFlowLayout in JJStaggeredGridCollectionViewLayout:
```swift
open var minimumLineSpacing: CGFloatopen 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
```swift
collectionviewLayout.numColumns = 3
```
## InstallationJJStaggeredGridCollectionView is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod "JJStaggeredGridCollectionView"
```## License
JJStaggeredGridCollectionView is available under the MIT license. See the LICENSE file for more info.