Skip to content

Instantly share code, notes, and snippets.

@ctrevarthen
Last active November 19, 2015 03:37
Show Gist options
  • Save ctrevarthen/875e723f58ee8d5bc180 to your computer and use it in GitHub Desktop.
Save ctrevarthen/875e723f58ee8d5bc180 to your computer and use it in GitHub Desktop.
ShopQuick: Mark as Purchased - VC
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