{"id":17540334,"url":"https://github.com/bitwit/bwswiperevealcell","last_synced_at":"2025-08-25T15:09:17.470Z","repository":{"id":56903319,"uuid":"46137484","full_name":"bitwit/BWSwipeRevealCell","owner":"bitwit","description":"A Swift library for swipeable table cells","archived":false,"fork":false,"pushed_at":"2019-04-08T22:38:20.000Z","size":282,"stargazers_count":68,"open_issues_count":4,"forks_count":10,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-08-23T18:42:32.611Z","etag":null,"topics":[],"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/bitwit.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}},"created_at":"2015-11-13T17:39:55.000Z","updated_at":"2024-07-12T00:11:38.000Z","dependencies_parsed_at":"2022-08-21T01:50:48.835Z","dependency_job_id":null,"html_url":"https://github.com/bitwit/BWSwipeRevealCell","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/bitwit/BWSwipeRevealCell","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitwit%2FBWSwipeRevealCell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitwit%2FBWSwipeRevealCell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitwit%2FBWSwipeRevealCell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitwit%2FBWSwipeRevealCell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitwit","download_url":"https://codeload.github.com/bitwit/BWSwipeRevealCell/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitwit%2FBWSwipeRevealCell/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272084844,"owners_count":24870584,"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","status":"online","status_checked_at":"2025-08-25T02:00:12.092Z","response_time":1107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-20T22:23:26.276Z","updated_at":"2025-08-25T15:09:17.418Z","avatar_url":"https://github.com/bitwit.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# BWSwipeRevealCell\n\n![Example](https://raw.githubusercontent.com/bitwit/BWSwipeRevealCell/master/example.gif)\n\n### Using the library\n\n**Note: Use version 1.0.1 for Swift 2.3 support and version 2.0.0 or higher for Swift 3 support **\n\nThere are two main classes available - `BWSwipeCell` and `BWSwipeRevealCell`\n\n**BWSwipeCell** - Only contains the pan gesture handling, and is useful mainly for heavy customization through subclassing if all you need is a leg up on swipe interactions\n\n**BWSwipeRevealCell** - Is an out of the box solution that lets you set images and colors for 1 action on the left and right of the table cell. BWSwipeRevealCell is a subclass of BWSwipeCell.\n\n\n### BWSwipeRevealCell Example\nAfter setting `BWSwipeRevealCell` as your table cell's type in the storyboard and setting a delegate. Use this code in your controller:\n```swift\n    \n    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -\u003e UITableViewCell {\n        let cell = tableView.dequeueReusableCell(withIdentifier: \"Cell\", for: indexPath) as! BWSwipeRevealCell\n        \n        swipeCell.bgViewLeftImage = UIImage(named:\"Done\")!.withRenderingMode(.alwaysTemplate)\n        swipeCell.bgViewLeftColor = UIColor.green\n        \n        swipeCell.bgViewRightImage = UIImage(named:\"Delete\")!.withRenderingMode(.alwaysTemplate)\n        swipeCell.bgViewRightColor = UIColor.red\n        \n        swipeCell.type = .springRelease\n        \n        swipeCell.delegate = self // Or whatever your delegate might be\n        return cell\n    }\n```\n\n### Customizing through the interface\n\n#### BWSwipeCell Properties\n\n**var type:BWSwipeCellType**\n\nCan be `.springRelease`, `.swipeThrough` or `.slidingDoor`. Defaults to `.springRelease`\n\n**var revealDirection: BWSwipeCellRevealDirection**\n\nCan be `.both`, `.left` or `.right`. Defaults to `.both`\n\n**(readonly) var state: BWSwipeCellState**\n\nCan be `.normal`, `.pastThresholdLeft` or `.pastThresholdRight`\n\n**var threshold: CGFloat**\n\nThe point at which pan elasticity starts, and `state` changes. Defaults to the height of the `UITableViewCell` (i.e. when it form a perfect square)\n\n**(readonly) var progress:CGFloat**\n\nA number between 0 and 1 to indicate progress toward reaching threshold in the current swiping direction. Useful for changing UI gradually as the user swipes.\n\n**var shouldExceedThreshold: Bool**\n\nControl whether or not the cell pans past the threshold point\n\n**var panElasticityFactor: CGFloat**\n\nControl how much elasticity there is past threshold, if it can be exceeded. Default is `0.7` and `1.0` would mean no elastic resistance\n\n**var animationDuration: Double**\n\nAnimation duration. Defaults to `0.2`\n\n**weak var delegate: BWSwipeCellDelegate?**\n\nSet the delegate on the cell\n\n```swift\n@objc public protocol BWSwipeCellDelegate: NSObjectProtocol {\n    optional func swipeCellDidStartSwiping(cell: BWSwipeCell)\n    optional func swipeCellDidSwipe(cell: BWSwipeCell)\n    optional func swipeCellWillRelease(cell: BWSwipeCell)\n    optional func swipeCellDidCompleteRelease(cell: BWSwipeCell)\n    optional func swipeCellDidChangeState(cell: BWSwipeCell)\n}\n```\n\n#### BWSwipeRevealCell Properties\n\n**var bgViewInactiveColor: UIColor**\n\n**var bgViewLeftColor: UIColor**\n\n**var bgViewRightColor: UIColor**\n\nColors for inactive, and activated states for left and right\n\n**var bgViewLeftImage: UIImage?**\n\n**var bgViewRightImage: UIImage?**\n\nImages for the left and right actions\n\n**weak var delegate: BWSwipeRevealCellDelegate?**\n\n```swift\n@objc public protocol BWSwipeRevealCellDelegate:BWSwipeCellDelegate {\n    optional func swipeCellActivatedAction(cell: BWSwipeCell, isActionLeft: Bool)\n}\n```\n\nSet the delegate on the cell\n### Roadmap\nSome brief ideas on ways to improve this library\n\n#### v 1.x.0 (Swift 2.x version)\n- Complete\n\n##### v 2.x.0 (Swift 3.x version)\n- Fix bugs\n\n##### v 3.0.0\n- [See Github Milestone](https://github.com/bitwit/BWSwipeRevealCell/milestones/Version%203.0.0)\n\n##### v x.0.0 (a.k.a. Ideas. PRs welcome.)\n- Customizable interaction per side (i.e. left .SwipeThrough, right .SlidingDoor)\n- Possible subclass for allowing .SlidingDoor to convert to .SwipeThrough past a threshold point (see Mail.app)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitwit%2Fbwswiperevealcell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitwit%2Fbwswiperevealcell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitwit%2Fbwswiperevealcell/lists"}