Popularity
7.2
Stable
Activity
0.0
Stable
867
33
147

Code Quality Rank: L5
Programming language: Swift
License: MIT License
Tags: UI    
Latest version: v0.6.1

RAReorderableLayout alternatives and similar libraries

Based on the "UI" category.
Alternatively, view RAReorderableLayout alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of RAReorderableLayout or a related project?

Add another 'UI' Library

README

RAReorderableLayout

A UICollectionView layout which you can move items with drag and drop.

Screen shots

screen shot1 screen shot2

Animation

animated gif

Requirements

  • Swift 3.0 / Xcode 8
    OS X 10.9 or later iOS 8.0 or later watchOS 2.0 or later tvOS 9.0 or later

Still wanna use swift2.2 or 2.3?
-> You can use 0.5.0 instead.

Installation

iOS8 or later

CocoaPods

# Podfile  
use_frameworks!  

target 'YOUR_TARGET_NAME' do
  pod 'RAReorderableLayout'
end

Carthage

 # Cartfile
 github "ra1028/RAReorderableLayout"

Usage

Setup your collection view to use RAReorderableLayout.
You must reorder cells information array in RAReorderableLayoutDelegate protocol to support reordering capability.
Specifically, please refer to Demo-project.

Protocol

Delegate

optional func collectionView(collectionView: UICollectionView, atIndexPath: NSIndexPath, willMoveToIndexPath toIndexPath: NSIndexPath)
optional func collectionView(collectionView: UICollectionView, atIndexPath: NSIndexPath, didMoveToIndexPath toIndexPath: NSIndexPath)

optional func collectionView(collectionView: UICollectionView, allowMoveAtIndexPath indexPath: NSIndexPath) -> Bool
optional func collectionView(collectionView: UICollectionView, atIndexPath: NSIndexPath, canMoveToIndexPath: NSIndexPath) -> Bool

optional func collectionView(collectionView: UICollectionView, collectionViewLayout layout: RAReorderableLayout, willBeginDraggingItemAtIndexPath indexPath: NSIndexPath)
optional func collectionView(collectionView: UICollectionView, collectionViewLayout layout: RAReorderableLayout, didBeginDraggingItemAtIndexPath indexPath: NSIndexPath)
optional func collectionView(collectionView: UICollectionView, collectionViewLayout layout: RAReorderableLayout, willEndDraggingItemToIndexPath indexPath: NSIndexPath)
optional func collectionView(collectionView: UICollectionView, collectionViewLayout layout: RAReorderableLayout, didEndDraggingItemToIndexPath indexPath: NSIndexPath)

Datasource

optional func collectionView(collectionView: UICollectionView, reorderingItemAlphaInSection section: Int) -> CGFloat
optional func scrollTrigerEdgeInsetsInCollectionView(collectionView: UICollectionView) -> UIEdgeInsets
optional func scrollTrigerPaddingInCollectionView(collectionView: UICollectionView) -> UIEdgeInsets
optional func scrollSpeedValueInCollectionView(collectionView: UICollectionView) -> CGFloat

License

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


*Note that all licence references and agreements mentioned in the RAReorderableLayout README section above are relevant to that project's source code only.