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

https://github.com/jeffreysfllo24/stickylayout

Sticky Layout for UICollectionViews!
https://github.com/jeffreysfllo24/stickylayout

collection collectionview fixed fixedcolumn fixedheader fixedrow flow flowlayout layout libraries stick sticky sticky-headers stickylayout swift swift5 table uicollectionview uicollectionviewlayout view

Last synced: 10 months ago
JSON representation

Sticky Layout for UICollectionViews!

Awesome Lists containing this project

README

          

# StickyLayout
[![codecov](https://codecov.io/gh/jeffreysfllo24/StickyLayout/branch/master/graph/badge.svg)](https://codecov.io/gh/jeffreysfllo24/StickyLayout)
[![pod](https://cocoapod-badges.herokuapp.com/v/StickyLayout/badge.png)](https://cocoapods.org/pods/StickyLayout)
[![Badge w/ Platform](https://cocoapod-badges.herokuapp.com/p/StickyLayout/badge.svg)](https://cocoadocs.org/pods/StickyLayout)
![License MIT](https://go-shields.herokuapp.com/license-MIT-blue.png)







##### The above examples are accessible in the `example` folder.

## What is StickyLayout?
**StickyLayout** is a collection view layout that provides sticky row and column configurability.

## Features

- [X] Configurable Sticky options.
- [X] Pure Swift 5.
- [X] Horizontal and vertical scrolling support.
- [X] Row spacing and column spacing support.
- [X] Works with every `UICollectionView`.

## Setup
Using **StickyLayout** quick and simple. First import `StickyLayout`.

```swift
import StickyLayout
```

You then have the option of creating an instance of `StickyConfig`, where you can specify which rows/columns you want to be sticky.

```swift
let stickyConfig = StickyLayoutConfig(stickyRowsFromTop: 1,
stickyRowsFromBottom: 0,
stickyColsFromLeft: 1,
stickyColsFromRight: 0)

let layout = StickyLayout(stickyConfig: stickyConfig)
```

Create an instance of `StickyLayout` with your `StickyConfig` as a parameter, and add it to your `UICollectionView`.
```swift
UICollectionView(frame: .zero, collectionViewLayout: layout)
```

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

```ruby
pod "StickyLayout"
```

## Feedback and Suggestions
If you have any suggestions or improvements please open a pull request or create an issue.

And if you found StickyLayout useful or want to show support feel free to star this repo!