测试已测试 | ✗ |
语言语言 | SwiftSwift |
许可 | MIT |
发布最后发布 | 2016年12月 |
SwiftSwift 版本 | 3.0 |
SPM支持 SPM | ✗ |
由 LeoMobileDeveloper 维护。
DraggableTableView 是一个将 UITableView 扩展为可以通过长按拖动的库。
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 文件。