SwipeCellKit travis-ci SwiftPM CocoaPods

Swipeable UITableViewCell based on the stock Mail.app, implemented in Swift.


Build Status Version Status Swift 3.0 license MIT Platform Carthage compatible Twitter

Swipeable UITableViewCell based on the stock Mail.app, implemented in Swift.


A swipeable UITableViewCell with support for:

  • Left and right swipe actions
  • Action buttons with: text only, text + image, image only
  • Haptic Feedback
  • Customizable transitions: Border, Drag, and Reveal
  • Customizable action button behavior during swipe
  • Animated expansion when dragging past threshold
  • Customizable expansion animations
  • Accessibility


Check out my blog post on how SwipeCellKit came to be.


Transition Styles

The transition style describes how the action buttons are exposed during the swipe.





Expansion Styles

The expansion style describes the behavior when the cell is swiped past a defined threshold.






  • Swift 3.0
  • Xcode 8
  • iOS 9.0+


CocoaPods (recommended)


# Latest release in CocoaPods
pod 'SwipeCellKit'

# Get the latest on develop
pod 'SwipeCellKit', :git => 'https://github.com/jerkoch/SwipeCellKit.git', :branch => 'develop'


github "jerkoch/SwipeCellKit"


Read the docs. Generated with jazzy. Hosted by GitHub Pages.


Set the delegate property on SwipeTableViewCell:

override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
    let cell = tableView.dequeueReusableCell(withIdentifier: "Cell") as! SwipeTableViewCell
    cell.delegate = self
    return cell

Adopt the SwipeTableViewCellDelegate protocol:

func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath, for orientation: SwipeActionsOrientation) -> [SwipeAction]? {
    guard orientation == .right else { return nil }

    let deleteAction = SwipeAction(style: .destructive, title: "Delete") { action, indexPath in
        // handle action by updating model with deletion

    // customize the action appearance
    deleteAction.image = UIImage(named: "delete")

    return [deleteAction]

Optionally, you can implement the editActionsOptionsForRowAt method to customize the behavior of the swipe actions:

func tableView(_ tableView: UITableView, editActionsOptionsForRowAt indexPath: IndexPath, for orientation: SwipeActionsOrientation) -> SwipeTableOptions {
    var options = SwipeTableOptions()
    options.expansionStyle = .destructive
    options.transitionStyle = .border
    return options


Three built-in transition styles are provided by SwipeTransitionStyle:

  • .border: The visible action area is equally divide between all action buttons.
  • .drag: The visible action area is dragged, pinned to the cell, with each action button fully sized as it is exposed.
  • .reveal: The visible action area sits behind the cell, pinned to the edge of the table view, and is revealed as the cell is dragged aside.

See Customizing Transitions for more details on customizing button appearance as the swipe is performed.


Four built-in expansion styles are provided by SwipeExpansionStyle:

  • .selection
  • .destructive (like Mail.app)
  • .destructiveAfterFill (like Mailbox/Tweetbot)
  • .fill

Much effort has gone into making SwipeExpansionStyle extremely customizable. If these built-in styles do not meet your needs, see Customizing Expansion for more details on creating custom styles.

The built-in .fill expansion style requires manual action fulfillment. This means your action handler must call SwipeAction.fulfill(style:) at some point during or after invocation to resolve the fill expansion. The supplied ExpansionFulfillmentStyle allows you to delete or reset the cell at some later point (possibly after further user interaction).

The built-in .destructive, and .destructiveAfterFill expansion styles are configured to automatically perform row deletion when the action handler is invoked (automatic fulfillment). Your deletion behavior may require coordination with other row animations (eg. inside beginUpdates and endUpdates). In this case, you can easily create a custom SwipeExpansionStyle which requires manual fulfillment to trigger deletion:

var options = SwipeTableOptions()
options.expansionStyle = .destructive(automaticallyDelete: false)

NOTE: You must call SwipeAction.fulfill(with style:) at some point while/after your action handler is invoked to trigger deletion. Do not call deleteRows directly.

let delete = SwipeAction(style: .destructive, title: nil) { action, indexPath in
    // Update model
    self.emails.remove(at: indexPath.row)

    // Coordinate table view update animations
    self.tableView.insertRows(at: [IndexPath(row: 0, section: 1)], with: .automatic)
    action.fulfill(with: .delete)


See the Advanced Guide for more details on customization.


Maintained by @mkurabi.


We’re interested in knowing who’s using SwipeCellKit in their app. Please submit a pull request to add your app!


SwipeCellKit is released under an MIT License. See LICENSE for details.

Please provide attribution, it is greatly appreciated.

Related Repositories



Swipeable UITableViewCell based on the stock Mail.app, implemented in Swift. ...

Top Contributors

jerkoch kurabi DMCApps sammygutierrez sgruby mbutan


-   1.9.0 zip tar
-   1.8.0 zip tar
-   1.7.0 zip tar
-   1.6.1 zip tar
-   1.6.0 zip tar
-   1.5.0 zip tar
-   1.4.0 zip tar
-   1.3.0 zip tar
-   1.2.1 zip tar
-   1.2.0 zip tar
-   1.1.1 zip tar
-   1.1.0 zip tar
-   1.0.0 zip tar