Skip to content

Instantly share code, notes, and snippets.

@ctrevarthen
Last active November 19, 2015 03:39
Show Gist options
  • Save ctrevarthen/c82937dd90ec7a9cef11 to your computer and use it in GitHub Desktop.
Save ctrevarthen/c82937dd90ec7a9cef11 to your computer and use it in GitHub Desktop.
ShopQuick - ShoppingListVC with SWTableViewCell Delegate methods - swipe control
// Allow just one cell's utility button to be open at once
func swipeableTableViewCellShouldHideUtilityButtonsOnSwipe(cell: SWTableViewCell!) -> Bool {
return true
}
// Determines which swipe directions are allowed per cell
func swipeableTableViewCell(cell: SWTableViewCell!, canSwipeToState state: SWCellState) -> Bool {
switch state {
case SWCellState.CellStateLeft:
return true
case SWCellState.CellStateRight:
return true
default:
return false
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment