DraggableTableView 0.2.0

DraggableTableView 0.2.0

测试已测试
语言语言 SwiftSwift
许可 MIT
发布最后发布2016年12月
SwiftSwift 版本3.0
SPM支持 SPM

LeoMobileDeveloper 维护。



  • Leo

DraggableTableView

DraggableTableView 是一个将 UITableView 扩展为可以通过长按拖动的库。

功能

  • [x] 默认

  • [x] 特别单元格固定

  • [x] 单元格内只有子视图可拖动

需求

  • iOS 8
  • Swift 3

安装

CocoaPod

pod "DraggableTableView"

使用方法

启用拖动并设置代理

self.tableView.dragable = true
self.tableView.dragableDelegate = self

在代理方法中,

 //Required, manage data source here
 func tableView(tableView: UITableView, dragCellFrom fromIndexPath: NSIndexPath, toIndexPath: NSIndexPath) 

 //Optional, decide if a cell can be draged from
 func tableView(tableView: UITableView, canDragCellTo indexPath: NSIndexPath) -> Bool 

 //Optional, decide if a cell can be draged to
 func tableView(tableView: UITableView, canDragCellFrom indexPath: NSIndexPath, withTouchPoint point: CGPoint) 

作者

Leo, [email protected]

许可

DraggableTableView 使用 MIT 许可证。有关更多信息,请参阅 LICENSE 文件。