All Projects → lxcid → Lxreorderablecollectionviewflowlayout

lxcid / Lxreorderablecollectionviewflowlayout

Licence: mit
Extends `UICollectionViewFlowLayout` to support reordering of cells. Similar to long press and pan on books in iBook.

Programming Languages

objective c
16641 projects - #2 most used programming language
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Lxreorderablecollectionviewflowlayout

Cpcollectionviewkit
Interesting UICollectionView layouts and transitions
Stars: ✭ 140 (-92.35%)
Mutual labels:  uicollectionviewlayout, uicollectionview
Alignedcollectionviewflowlayout
A collection view layout that gives you control over the horizontal and vertical alignment of the cells.
Stars: ✭ 751 (-58.98%)
Mutual labels:  uicollectionviewlayout, uicollectionview
Sortable
Reorderable drag-and-drop lists for modern browsers and touch devices. No jQuery or framework required.
Stars: ✭ 23,641 (+1191.15%)
Mutual labels:  drag-and-drop, reordering
Chtcollectionviewwaterfalllayout
The waterfall (i.e., Pinterest-like) layout for UICollectionView.
Stars: ✭ 4,288 (+134.19%)
Mutual labels:  uicollectionviewlayout, uicollectionview
Pagingkit
PagingKit provides customizable menu UI. It has more flexible layout and design than the other libraries.
Stars: ✭ 1,030 (-43.75%)
Mutual labels:  uicollectionviewlayout, uicollectionview
Kddraganddropcollectionview
This component allows for the transfer of data items between collection views through drag and drop
Stars: ✭ 476 (-74%)
Mutual labels:  drag-and-drop, uicollectionview
Swiftspreadsheet
Spreadsheet CollectionViewLayout in Swift. Fully customizable. 🔶
Stars: ✭ 590 (-67.78%)
Mutual labels:  uicollectionviewlayout, uicollectionview
Wslwaterflowlayout
功能描述:WSLWaterFlowLayout 是在继承于UICollectionViewLayout的基础上封装的控件, 目前支持竖向瀑布流(item等宽不等高、支持头脚视图)、水平瀑布流(item等高不等宽 不支持头脚视图)、竖向瀑布流( item等高不等宽、支持头脚视图)、栅格布局瀑布流 4种样式的瀑布流布局。
Stars: ✭ 308 (-83.18%)
Mutual labels:  uicollectionviewlayout, uicollectionview
Centeredcollectionview
A lightweight UICollectionViewLayout that 'pages' and centers its cells 🎡 written in Swift
Stars: ✭ 965 (-47.3%)
Mutual labels:  uicollectionviewlayout, uicollectionview
Collectionviewpaginglayout
a simple but highly customizable paging layout for UICollectionView.
Stars: ✭ 947 (-48.28%)
Mutual labels:  uicollectionviewlayout, uicollectionview
Collectionkit
Reimagining UICollectionView
Stars: ✭ 4,153 (+126.82%)
Mutual labels:  uicollectionviewlayout, uicollectionview
Bubblecollectionviewlayout
Create bubble layout of UICollectionView using custom layout
Stars: ✭ 79 (-95.69%)
Mutual labels:  uicollectionviewlayout, uicollectionview
Uicollectionview Layouts Kit
📐 A set of custom layouts for UICollectionView with examples [Swift 5.3, iOS 12].
Stars: ✭ 410 (-77.61%)
Mutual labels:  uicollectionviewlayout, uicollectionview
Carlenscollectionviewlayout
An easy-to-use Collection View Layout for card-like animation.
Stars: ✭ 478 (-73.89%)
Mutual labels:  uicollectionviewlayout, uicollectionview
Bouncylayout
Make. It. Bounce.
Stars: ✭ 4,035 (+120.37%)
Mutual labels:  uicollectionviewlayout, uicollectionview
React Beautiful Dnd
Beautiful and accessible drag and drop for lists with React
Stars: ✭ 25,810 (+1309.61%)
Mutual labels:  drag-and-drop, reordering
Uicollectionviewflexlayout
A drop-in replacement for UICollectionViewFlowLayout
Stars: ✭ 277 (-84.87%)
Mutual labels:  uicollectionviewlayout, uicollectionview
Swiftdatatables
A Swift Data Table package, display grid-like data sets in a nicely formatted table for iOS. Subclassing UICollectionView that allows ordering, and searching with extensible options.
Stars: ✭ 287 (-84.33%)
Mutual labels:  uicollectionviewlayout, uicollectionview
Blueprints
🌀 Blueprints - A framework that is meant to make your life easier when working with collection view flow layouts.
Stars: ✭ 874 (-52.27%)
Mutual labels:  uicollectionviewlayout, uicollectionview
Drcollectionviewtablelayout Ios
UICollectionView 2d-table / grid / spreadsheet layout
Stars: ✭ 74 (-95.96%)
Mutual labels:  uicollectionviewlayout, uicollectionview

LXReorderableCollectionViewFlowLayout

Extends UICollectionViewFlowLayout to support reordering of cells. Similar to long press and pan on books in iBook.

Features

The goal of LXReorderableCollectionViewFlowLayout is to provides capability for reordering of cell, similar to iBook.

  • Long press on cell to invoke reordering capability.
  • When reordering capability is invoked, fade the selected cell from highlighted to normal state.
  • Drag around the selected cell to move it to the desired location, the other cells adjust accordingly. Callback in the form of delegate methods are invoked.
  • Drag selected cell to the edges, depending on scroll direction, scroll in the desired direction.
  • Release to stop reordering.

Getting Started

Screenshot

  1. Install using CocoaPods or drag the LXReorderableCollectionViewFlowLayout folder into your project.

  2. Initialize/Setup your collection view to use LXReorderableCollectionViewFlowLayout.

  3. The collection view controller that is to support reordering capability must conforms to LXReorderableCollectionViewDataSource protocol. For example,

    - (void)collectionView:(UICollectionView *)collectionView itemAtIndexPath:(NSIndexPath *)fromIndexPath willMoveToIndexPath:(NSIndexPath *)toIndexPath {
        id object = [mutableArray objectAtIndex:fromIndexPath.item];
        [mutableArray removeObjectAtIndex:fromIndexPath.item];
        [mutableArray insertObject:object atIndex:toIndexPath.item];
    }
    
  4. You can listen to some dragging events through comforming to LXReorderableCollectionViewDelegateFlowLayout methods.

  5. Setup your collection view accordingly to your need, run and see it in action! :D

Changes

Feb 24 2013 (Luke Scott)

  • Removed setUpGestureRecognizersOnCollectionView
  • Removed layout from delegate methods (can be accessed from collectionView)
  • Renamed delegate methods and split between dataSource and delegate
  • Added dataSource and delegate examples to sample project

Feb 23 2013 (Luke Scott)

  • Refactored everything to be more readable / maintainable
  • Deprecated setUpGestureRecognizersOnCollectionView - no longer necessary

Requirements

  • ARC
  • iOS 6 and above preferred
  • Xcode 4.5 and above

Credits

Alternatives

License

LXReorderableCollectionViewFlowLayout is available under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].