Last active
November 19, 2015 03:39
-
-
Save ctrevarthen/c82937dd90ec7a9cef11 to your computer and use it in GitHub Desktop.
ShopQuick - ShoppingListVC with SWTableViewCell Delegate methods - swipe control
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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