https://github.com/oakstudios/stackedcollectionview
Swift library to drag, drop, and stack items within a UICollectionView.
https://github.com/oakstudios/stackedcollectionview
Last synced: about 1 year ago
JSON representation
Swift library to drag, drop, and stack items within a UICollectionView.
- Host: GitHub
- URL: https://github.com/oakstudios/stackedcollectionview
- Owner: oakstudios
- License: mit
- Created: 2017-08-10T23:28:27.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-11-27T21:12:32.000Z (over 7 years ago)
- Last Synced: 2025-04-13T16:18:02.671Z (about 1 year ago)
- Language: Swift
- Homepage:
- Size: 29.7 MB
- Stars: 29
- Watchers: 8
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
StackedCollectionView
=======================
[](http://cocoapods.org/pods/StackedCollectionView)
[](http://cocoapods.org/pods/StackedCollectionView)
[](http://cocoapods.org/pods/StackedCollectionView)
[](http://twitter.com/oakstudios)
## Introduction
`StackedCollectionView` is a `UICollectionViewFlowLayout` subclass written in Swift to provide drag-and-drop interactions within a `UICollectionView`. The behaviors include reorder and "stack" gestures, which emulate folder creation similar to the iOS home screen.
## Demo

Check out the example project for a customized `UICollectionView` similar to what is used in [Dropmark for iOS](https://itunes.apple.com/us/app/dropmark/id999122556?mt=8).
To run the example project, clone the repo, and run `pod install` from the *Example* directory first.
## Installation
Install the library through [CocoaPods](http://cocoapods.org). Add the following line to your *Podfile*, then run `pod install`.
```ruby
pod 'StackedCollectionView', '~> 3.0'
```
Be sure to import the library when needed.
```swift
import StackedCollectionView
```
## Migration
### Version 3.0.0
This version requires Xcode 10.0 and Swift 4.2.
### Version 2.0.0
This version requires Xcode 9.0 and Swift 4.
### Version 1.0.0
StackedCollectionView supports iOS 9.0+, Swift 3, and Xcode 8.0.
## Credits
Created by [Oak](https://oak.is) for [Dropmark](https://www.dropmark.com).
Portions of the reordering logic are referenced from [LXReorderableCollectionViewFlowLayout](https://github.com/lxcid/LXReorderableCollectionViewFlowLayout) and [this blog post](http://blog.karmadust.com/drag-and-rearrange-uicollectionviews-through-layouts/).
Example images provided by [Unsplash](https://unsplash.com).
## License
The MIT License (MIT)
Copyright (c) 2018 Oak, LLC [https://oak.is](https://oak.is)