Code Monkey home page Code Monkey logo

bfrreordertableview's Introduction

BFRTableReorder

Demo

Summary

The BFRTableReorder is an out of the box solution to add long press reordering to your ASDK apps ๐ŸŽ‰! It started off as an Objective-C port of the excellent Swift Reorder by Adam Shin, but we ended up hacking it apart for ASDK purposes.

We use it all over the place in Buffer for iOS :-).

Installation

The BFRTableReorder is hosted on CocoaPods and is the recommended way to install it:

pod 'BFRTableReorder'

Quickstart

To kick things off, you need to include one header file anywhere you want some reordering action to happen ๐Ÿ˜Š:

#import "ASTableNode+BFRReorder.h"

This will add the reorder property to any table node instance via a category. To get up and running quickly with BFRTableReorder, just set your controller as the delegate off of any ASTableNode's reorder property:

self.tableNode.reorder.delegate = self;

From there, you're only required to implement one delegate method, but there are several optional ones that can help out as well:

- (void)tableNode:(ASTableNode *)tableNode redorderRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath;

There is a very simple example in the demo project, feel free to fire it up if you want to see all the delegate methods in action ๐Ÿ’ฏ.

Going Forward

We regularly maintain this code, and you can also rest assured that it's been battle tested against thousands of users in production ๐Ÿ‘. That said, we get things wrong from time to time - so feel free to open an issue for anything you spot!

We are always happy to talk shop, so feel free to give us a shout on Twitter:

Or, hey - why not work on the BFRTableReorder and get paid for it!? We're hiring!


Licence

This project uses MIT License.

bfrreordertableview's People

Contributors

ay8s avatar

Watchers

Alvin Cris Uy avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.