An open API service indexing awesome lists of open source software.

https://github.com/inderdhir/staglayout

Custom UICollectionViewLayout for iOS that supports staggered layout for 2x2 (or 2x1) grids
https://github.com/inderdhir/staglayout

cocoapod cocoapods collectionviewflowlayout collectionviewlayout ios ios-lib staggered staggered-grid-layout swift

Last synced: 6 months ago
JSON representation

Custom UICollectionViewLayout for iOS that supports staggered layout for 2x2 (or 2x1) grids

Awesome Lists containing this project

README

          

# StagLayout

[![Version](https://img.shields.io/cocoapods/v/StagLayout.svg?style=flat)](https://cocoapods.org/pods/StagLayout)
[![License](https://img.shields.io/cocoapods/l/StagLayout.svg?style=flat)](https://cocoapods.org/pods/StagLayout)
[![Platform](https://img.shields.io/cocoapods/p/StagLayout.svg?style=flat)](https://cocoapods.org/pods/StagLayout)

Customizable UICollectionViewLayout that uses ratios (based on the collection view's width) to determine sizing of the cells. Only 2 max items per row are supported currently.

![Example_1](example_1.png)
![Example_2](example_2.png)
![Example_3](example_3.png)

## Example

To run the example project, clone the repo, and run `pod install` from the Example directory first.

## Installation

### Swift Package Manager

StagLayout is now available as a Swift package.

### Cocoapods

StagLayout is available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod 'StagLayout'
```

## Author

Inder Dhir, inderdhir@hotmail.com

## License

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