Last active
November 19, 2015 03:37
-
-
Save ctrevarthen/875e723f58ee8d5bc180 to your computer and use it in GitHub Desktop.
ShopQuick: Mark as Purchased - VC
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
| func swipeableTableViewCell(cell: SWTableViewCell!, didTriggerLeftUtilityButtonWithIndex index: Int) { | |
| switch index { | |
| case LeftUtilityButtons.Favorite.rawValue: | |
| if let indexPath = self.shoppingListTableView.indexPathForCell(cell) as NSIndexPath! { | |
| // TODO: Add Favorites functionality here | |
| } | |
| case LeftUtilityButtons.Purchase.rawValue: | |
| if let indexPath = self.shoppingListTableView.indexPathForCell(cell) as NSIndexPath! { | |
| self.shoppingListManager.markPurchasedAtIndex(indexPath.row) | |
| } | |
| default: | |
| break | |
| } | |
| self.shoppingListTableView.reloadData() | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment