All Projects → adamshin → Swiftreorder

adamshin / Swiftreorder

Licence: mit
Easy UITableView drag-and-drop cell reordering

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Swiftreorder

Pbtreeview
An UITreeView implementation from UITableView that Apple missed in its UIKit framework. And it is in pure Swift.
Stars: ✭ 128 (-62.35%)
Mutual labels:  uikit, ui-components, uitableview
Basecomponents
BaseComponents aims to provide easily reusable and understandable components to increase productivity with UIKit and Foundation APIs
Stars: ✭ 92 (-72.94%)
Mutual labels:  uikit, ui-components, uitableview
Wlemptystate
WLEmptyState is an iOS based component that lets you customize the view when the dataset of a UITableView or a UICollectionView is empty. We created a sample project with the WLEmptyState component to show how you can use it.
Stars: ✭ 305 (-10.29%)
Mutual labels:  uikit, uitableview
TableViewKit
Empowering UITableView with painless multi-type cell support and built-in automatic state transition animations
Stars: ✭ 105 (-69.12%)
Mutual labels:  uitableview, uikit
taiga-ui
Angular UI Kit and components library for awesome people
Stars: ✭ 2,251 (+562.06%)
Mutual labels:  uikit, ui-components
ios ui recipe showcase
iOSアプリ開発 - UI実装であると嬉しいレシピブック掲載サンプル
Stars: ✭ 54 (-84.12%)
Mutual labels:  uitableview, uikit
open design system
Open Source Design System using Sketch. It's early days of my project.
Stars: ✭ 22 (-93.53%)
Mutual labels:  uikit, ui-components
ng-sq-ui
Flexible and easily customizable UI-kit for Angular 11+
Stars: ✭ 99 (-70.88%)
Mutual labels:  uikit, ui-components
Underexpress
A free, responsive, ready to use website ui kit, built with bootstrap 4.
Stars: ✭ 205 (-39.71%)
Mutual labels:  uikit, ui-components
sodium-ui
Sodium is a simple, modular and customizable web component library to build elegant and accessible UI pieces for your React Application.
Stars: ✭ 23 (-93.24%)
Mutual labels:  uikit, ui-components
monalisa-ui
MonalisaUI ✨ React Native UI Library
Stars: ✭ 37 (-89.12%)
Mutual labels:  uikit, ui-components
laravel-starter-kit
A minimal starter kit for Laravel 8 using Bootstrap 5 and Webpixels CSS.
Stars: ✭ 23 (-93.24%)
Mutual labels:  uikit, ui-components
StackableTableView
A UITableView subclass that enables setting an array of views for both headers and footers utilizing UIStackView
Stars: ✭ 72 (-78.82%)
Mutual labels:  uitableview, uikit
Squaremosaiclayout
An extandable mosaic UICollectionViewLayout with a focus on extremely flexible customizations 🔶
Stars: ✭ 243 (-28.53%)
Mutual labels:  uikit, uitableview
CheckMarkView
UI view which draws programmatically a checkmark with different styles
Stars: ✭ 35 (-89.71%)
Mutual labels:  uikit, ui-components
Numl
A UI Design Language, WC UI Library, and Runtime CSS Framework for rapidly building interfaces that follow your Design System 🌈
Stars: ✭ 229 (-32.65%)
Mutual labels:  uikit, ui-components
qi-design-vue
This is a design standard with an implement for web UI components library based on Vue.
Stars: ✭ 26 (-92.35%)
Mutual labels:  uikit, ui-components
Uix Kit
A free UI toolkit based on some common libraries for building beautiful responsive website, compatible with Bootstrap v4.
Stars: ✭ 318 (-6.47%)
Mutual labels:  uikit, ui-components
Boomerang Free Bootstrap Ui Kit
Boomerang is a high quality UI Kit built on top of the well known Bootstrap 4 Framework. This theme was designed as its own extended version of Bootstrap with multiple functionalities and controls added, extended color palette and beautiful typography.
Stars: ✭ 196 (-42.35%)
Mutual labels:  uikit, ui-components
Komponents Deprecated
📦 React-inspired UIKit Components - ⚠️ Deprecated
Stars: ✭ 202 (-40.59%)
Mutual labels:  uikit, ui-components

SwiftReorder

NOTE: Some users have encountered compatibility issues when using this library with recent versions of iOS. For apps targeting iOS 11 and up, it's recommended to use the built-in UITableView drag and drop API instead.

SwiftReorder is a UITableView extension that lets you add long-press drag-and-drop reordering to any table view. It's robust, lightweight, and fully customizable.

Demo

Features

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

Installation

CocoaPods

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

pod 'SwiftReorder', '~> 7.2'

Carthage

To integrate SwiftReorder into your Xcode project using Carthage, specify it in your Cartfile:

github "adamshin/SwiftReorder" ~> 7.2

Remember to add SwiftReorder to your Carthage build phase:

$(SRCROOT)/Carthage/Build/iOS/SwiftReorder.framework

and

$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/SwiftReorder.framework

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.
override func viewDidLoad() {
    // ...
    tableView.reorder.delegate = self
}
  • Add this code to the beginning of your tableView(_:cellForRowAt:).
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
    if let spacer = tableView.reorder.spacerCell(for: indexPath) {
        return spacer
    }
    // ...
}
  • Implement the tableView(_:reorderRowAt:to:) delegate method, and others as necessary.
extension MyViewController: TableViewReorderDelegate {
    func tableView(_ tableView: UITableView, reorderRowAt sourceIndexPath: IndexPath, to destinationIndexPath: IndexPath) {
        // Update data model
    }
}

This method is analogous to the UITableViewDataSource method tableView(_:moveRowAt:to:). However, it may be called multiple times in the course of one drag-and-drop action.

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
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].