프로젝트
GitHub에서 보기
KyoheiG3/TableViewDragger
소개
UITableView의 셀을 드래그 앤 드롭으로 재배치할 수 있습니다.
기타 프로젝트측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalTableViewDragger


This is a demo that uses a TableViewDragger.
Appetize's Demo
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
trueif 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)
UITableViewwant 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 tomoveRowAtIndexPath: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.
관련 프로젝트 살펴보기
불러오는 중…