Giter VIP home page Giter VIP logo

tableviewdragger's Introduction

TableViewDragger

Carthage compatible Version License Platform

simpleimage

This is a demo that uses a TableViewDragger.

Requirements

  • Swift 5.0
  • iOS 11.0 or later

How to Install TableViewDragger

CocoaPods

Add the following to your Podfile:

pod "TableViewDragger"

Carthage

Add the following to your Cartfile:

github "KyoheiG3/TableViewDragger"

Usage

TableViewDragger Variable

weak var delegate: TableViewDraggerDelegate?
  • Delegate of TableViewDragger.
weak var dataSource: TableViewDraggerDataSource?
  • DataSource of TableViewDragger.
var isHiddenOriginCell: Bool
  • It will be true if want to hide the original cell.
  • Default is true.
var zoomScaleForCell: CGFloat
  • Zoom scale of cell in drag.
  • Default is 1.
var alphaForCell: CGFloat
  • Alpha of cell in drag.
  • Default is 1.
var opacityForShadowOfCell: Float
  • Opacity of cell shadow in drag.
  • Default is 0.4.
var scrollVelocity: CGFloat
  • Velocity of auto scroll in drag.
  • Default is 1.

TableViewDragger Function

init(tableView: UITableView)
  • UITableView want to drag.

TableViewDraggerDataSource Function

optional func dragger(_ dragger: TableViewDragger, cellForRowAt indexPath: IndexPath) -> UIView?
  • Return any cell if want to change the cell in drag.
optional func dragger(_ dragger: TableViewDragger, indexPathForDragAt indexPath: IndexPath) -> IndexPath
  • Return the indexPath if want to change the indexPath to start drag.

TableViewDraggerDelegate Function

func dragger(_ dragger: TableViewDragger, moveDraggingAt indexPath: IndexPath, newIndexPath: IndexPath) -> Bool
  • If allow movement of cell, please return true. require a call to moveRowAtIndexPath:toIndexPath: of UITableView and rearranged of data.
optional func dragger(_ dragger: TableViewDragger, shouldDragAt indexPath: IndexPath) -> Bool
  • If allow dragging of cell, prease return true.

Author

Kyohei Ito

Follow me 🎉

LICENSE

Under the MIT license. See LICENSE file for details.

tableviewdragger's People

Contributors

hanorz avatar kyoheig3 avatar pirogman avatar ramonvasc0 avatar readmecritic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tableviewdragger's Issues

Carthage

Install section for Carthage is missing

iOS 10. Dragging cell disappears

Whenever i try to drag a cell by pressing on the top edge of the cell. The cell vanishes and isn't visible in the debug view heirarchy either. Here is what happens:

The delegate method for willBeginDragging gets called but didEndDraggingAt isn't called and in this particular case ONLY, the following gets printed into the logs:

"Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen updates."

Here is a screenshot:

screen shot 2018-04-12 at 3 08 36 pm

Crash

When I run the demo app it crashes with a complaint about not being able to find images. I see the demo on Appetize also crashes, maybe due to the same issue. Running on iOS11..

Bug

Hi,

Impossible move row, if a section is empty.

No shared framework schemes available

hi, there is error while building this project using carthage, the error is like this: Dependency "TableViewDragger" has no shared framework schemes。: )

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.