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!
- Host: GitHub
- URL: https://github.com/jeffreysfllo24/stickylayout
- Owner: jeffreysfllo24
- License: mit
- Created: 2020-04-28T20:47:50.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-20T15:01:54.000Z (about 6 years ago)
- Last Synced: 2025-08-17T02:53:51.517Z (10 months ago)
- Topics: collection, collectionview, fixed, fixedcolumn, fixedheader, fixedrow, flow, flowlayout, layout, libraries, stick, sticky, sticky-headers, stickylayout, swift, swift5, table, uicollectionview, uicollectionviewlayout, view
- Language: Swift
- Homepage:
- Size: 14.9 MB
- Stars: 41
- Watchers: 2
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# StickyLayout
[](https://codecov.io/gh/jeffreysfllo24/StickyLayout)
[](https://cocoapods.org/pods/StickyLayout)
[](https://cocoadocs.org/pods/StickyLayout)

##### 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!