GithubHelp home page GithubHelp logo

yanshiyu / jxmovablecelltableview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pujiaxin33/jxmovablecelltableview

1.0 0.0 0.0 3.51 MB

The custom tableView which can start moving the cell with a long press gesture.

License: MIT License

Objective-C 80.57% Ruby 16.62% Swift 2.81%

jxmovablecelltableview's Introduction

Overview

The custom tableView which can start moving the cell with a long press gesture. The JXMovableCellTableView which added a UILongPressGestureRecognizer. when gesture started take a snapshot for cell which pressed.Then you can customize movable cell and start move animation.

中文介绍

Check it out!

  • Edge scroll

EdgeScroll

  • Neon light

Neonlight

  • Breath

Breath

Features

  • Just need a long press gesture can start moving cell. Don't need call system api [tableView setEditing:YES animated:YES];.
  • Highly customizing the cell style being moved.
  • Highly customizing start move cell animation.
  • Support to move to the edge of the screen to scroll the tableview.

Usage

  • canEdgeScroll

    Whether to allow dragging to the edge of the screen, turn on edge scrolling.default YES.

  • edgeScrollRange

    The edge scrolls the trigger range, and the closer to the edge, the faster the speed. The default is 150.

  • JXMovableCellTableViewDelegate

  /**
 *  The cell that will start moving the indexPath location
 */
- (void)tableView:(JXMovableCellTableView *)tableView willMoveCellAtIndexPath:(NSIndexPath *)indexPath;
/**
 *  Move cell `fromIndexPath` to `toIndexPath` completed
 */
- (void)tableView:(JXMovableCellTableView *)tableView didMoveCellFromIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath;
/**
 *  Move cell ended
 */
- (void)tableView:(JXMovableCellTableView *)tableView endMoveCellAtIndexPath:(NSIndexPath *)indexPath;

/**
 *  The user tries to move a cell that is not allowed to move. You can make some prompts to inform the user.
 */
- (void)tableView:(JXMovableCellTableView *)tableView tryMoveUnmovableCellAtIndexPath:(NSIndexPath *)indexPath;

/**
 *  Customize the screenshot style of the movable cell
 */
- (void)tableView:(JXMovableCellTableView *)tableView customizeMovalbeCell:(UIImageView *)movableCellsnapshot;

/**
 *  Custom start moving cell animation
 */
- (void)tableView:(JXMovableCellTableView *)tableView customizeStartMovingAnimation:(UIImageView *)movableCellsnapshot fingerPoint:(CGPoint)fingerPoint;
  • JXMovableCellTableViewDataSource
/**
 *  Get the data source array of the tableView, each time you start the call to get the latest data source.
 *  The array in the data source must be a mutable array, otherwise it cannot be exchanged
 *  The format of the data source:@[@[sectionOneArray].mutableCopy, @[sectionTwoArray].mutableCopy, ....].mutableCopy
 *  Even if there is only one section, the outermost layer needs to be wrapped in an array, such as:@[@[sectionOneArray].mutableCopy].mutableCopy
 */
- (NSMutableArray *)dataSourceArrayInTableView:(JXMovableCellTableView *)tableView;

Installation

Manual

Download git reposity, decompress zip, drag JXMovableCellTableView.h&.m into your project.

CocoaPods

target '<Your Target Name>' do
    pod 'JXMovableCellTableView'
end

You should run pod repo udpate before pod install

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.