{"id":2842,"url":"https://github.com/KyoheiG3/TableViewDragger","last_synced_at":"2025-08-03T12:31:22.387Z","repository":{"id":44599503,"uuid":"43065059","full_name":"KyoheiG3/TableViewDragger","owner":"KyoheiG3","description":"A cells of UITableView can be rearranged by drag and drop.","archived":false,"fork":false,"pushed_at":"2023-08-27T12:53:54.000Z","size":1484,"stargazers_count":530,"open_issues_count":3,"forks_count":51,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-04-24T18:57:46.659Z","etag":null,"topics":["drag","indexpath","ios","swift","uitableview"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KyoheiG3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-09-24T12:21:23.000Z","updated_at":"2024-04-19T16:44:21.000Z","dependencies_parsed_at":"2024-01-02T21:27:19.314Z","dependency_job_id":null,"html_url":"https://github.com/KyoheiG3/TableViewDragger","commit_stats":{"total_commits":53,"total_committers":5,"mean_commits":10.6,"dds":"0.18867924528301883","last_synced_commit":"f0b6182803742049f841f91cc446862424120b45"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KyoheiG3%2FTableViewDragger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KyoheiG3%2FTableViewDragger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KyoheiG3%2FTableViewDragger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KyoheiG3%2FTableViewDragger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KyoheiG3","download_url":"https://codeload.github.com/KyoheiG3/TableViewDragger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228543149,"owners_count":17934433,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["drag","indexpath","ios","swift","uitableview"],"created_at":"2024-01-05T20:16:24.275Z","updated_at":"2024-12-07T00:31:00.286Z","avatar_url":"https://github.com/KyoheiG3.png","language":"Swift","funding_links":[],"categories":["UI"],"sub_categories":["Table View / Collection View","Layout","Other free courses"],"readme":"# TableViewDragger\n\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![Version](https://img.shields.io/cocoapods/v/TableViewDragger.svg?style=flat)](http://cocoadocs.org/docsets/TableViewDragger)\n[![License](https://img.shields.io/cocoapods/l/TableViewDragger.svg?style=flat)](http://cocoadocs.org/docsets/TableViewDragger)\n[![Platform](https://img.shields.io/cocoapods/p/TableViewDragger.svg?style=flat)](http://cocoadocs.org/docsets/TableViewDragger)\n\n![simple](https://user-images.githubusercontent.com/5707132/33757706-a5b5cf6c-dc3e-11e7-9275-b54b7897da59.gif)![image](https://user-images.githubusercontent.com/5707132/33757803-19c44622-dc3f-11e7-913e-b39aa3f45791.gif)\n\nThis is a demo that uses a `TableViewDragger`.\n\n#### [Appetize's Demo](https://appetize.io/app/p92e7wrmfkq32t473fuavn8bmm)\n\n## Requirements\n\n- Swift 5.0\n- iOS 11.0 or later\n\n## How to Install TableViewDragger\n\n#### CocoaPods\n\nAdd the following to your `Podfile`:\n\n```Ruby\npod \"TableViewDragger\"\n```\n\n#### Carthage\n\nAdd the following to your `Cartfile`:\n\n```Ruby\ngithub \"KyoheiG3/TableViewDragger\"\n```\n\n## Usage\n\n### TableViewDragger Variable\n\n```swift\nweak var delegate: TableViewDraggerDelegate?\n```\n* Delegate of `TableViewDragger`.\n\n```swift\nweak var dataSource: TableViewDraggerDataSource?\n```\n* DataSource of `TableViewDragger`.\n\n```swift\nvar isHiddenOriginCell: Bool\n```\n* It will be `true` if want to hide the original cell.\n* Default is `true`.\n\n```swift\nvar zoomScaleForCell: CGFloat\n```\n* Zoom scale of cell in drag.\n* Default is `1`.\n\n```swift\nvar alphaForCell: CGFloat\n```\n* Alpha of cell in drag.\n* Default is `1`.\n\n```swift\nvar opacityForShadowOfCell: Float\n```\n* Opacity of cell shadow in drag.\n* Default is `0.4`.\n\n```swift\nvar scrollVelocity: CGFloat\n```\n* Velocity of auto scroll in drag.\n* Default is `1`.\n\n### TableViewDragger Function\n\n```swift\ninit(tableView: UITableView)\n```\n* `UITableView` want to drag.\n\n### TableViewDraggerDataSource Function\n\n```swift\noptional func dragger(_ dragger: TableViewDragger, cellForRowAt indexPath: IndexPath) -\u003e UIView?\n```\n* Return any cell if want to change the cell in drag.\n\n```swift\noptional func dragger(_ dragger: TableViewDragger, indexPathForDragAt indexPath: IndexPath) -\u003e IndexPath\n```\n* Return the indexPath if want to change the indexPath to start drag.\n\n### TableViewDraggerDelegate Function\n\n```swift\nfunc dragger(_ dragger: TableViewDragger, moveDraggingAt indexPath: IndexPath, newIndexPath: IndexPath) -\u003e Bool\n```\n* If allow movement of cell, please return `true`. require a call to `moveRowAtIndexPath:toIndexPath:` of UITableView and rearranged of data.\n\n```swift\noptional func dragger(_ dragger: TableViewDragger, shouldDragAt indexPath: IndexPath) -\u003e Bool\n```\n* If allow dragging of cell, prease return `true`.\n\n## Author\n\n#### Kyohei Ito\n\n- [GitHub](https://github.com/kyoheig3)\n- [Twitter](https://twitter.com/kyoheig3)\n\nFollow me 🎉\n\n## LICENSE\n\nUnder the MIT license. See LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKyoheiG3%2FTableViewDragger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FKyoheiG3%2FTableViewDragger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKyoheiG3%2FTableViewDragger/lists"}