Latest 2.0.2
Homepage https://github.com/adamshin/SwiftReorder
License MIT
Platforms ios 8.0

SwiftReorder is a UITableView extension that lets you easily add drag-and-drop reordering to any table view. It’s robust, lightweight, and completely customizable.

Demo

Features

  • [x] Smooth animations
  • [x] Automatic edge scrolling
  • [x] Works with multiple table sections
  • [x] Customizable shadow, scaling, and transparency effects

Installation

CocoaPods

To integrate SwiftReorder into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'SwiftReorder', '~> 2.0'

Manually

You can integrate SwiftReorder into your project manually by copying the contents of the Source folder into your project.

Usage

Setup

  • Add the following line to your table view setup.
    tableView.reorder.delegate = self
  • Add this code to the beginning of your tableView(_:cellForRowAt:).
    if let spacer = tableView.reorder.spacerCell(for: indexPath) {
    return spacer
    }
  • Implement this TableViewReorderDelegate method, and others as necessary.
    tableView(_:reorderRowAt:to:)

Customization

SwiftReorder exposes several properties for adjusting the style of the reordering effect. For example, you can add a scaling effect to the selected cell:

tableView.reorder.cellScale = 1.05

Or adjust the shadow:

tableView.reorder.shadowOpacity = 0.5
tableView.reorder.shadowRadius = 20

Latest podspec

{
    "name": "SwiftReorder",
    "version": "2.0.2",
    "license": "MIT",
    "summary": "Easy drag-and-drop reordering for UITableViews",
    "homepage": "https://github.com/adamshin/SwiftReorder",
    "authors": "Adam Shin",
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/adamshin/SwiftReorder.git",
        "tag": "2.0.2"
    },
    "source_files": "Source/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This