Skip to content

Instantly share code, notes, and snippets.

@ctrevarthen
Last active November 19, 2015 03:37
Show Gist options
  • Save ctrevarthen/ce8eb0698eaba854f188 to your computer and use it in GitHub Desktop.
Save ctrevarthen/ce8eb0698eaba854f188 to your computer and use it in GitHub Desktop.
ShopQuick - Favorites VC Left Buttons
func swipeableTableViewCell(cell: SWTableViewCell!, didTriggerLeftUtilityButtonWithIndex index: Int) {
switch index {
case LeftUtilityButtons.AddToList.rawValue:
if let indexPath = self.favoritesTableView.indexPathForCell(cell) as NSIndexPath! {
let fav = self.favoritesManager.productAtIndex(indexPath.row)
self.shoppingListManager.addProduct(fav)
}
default:
break
}
self.favoritesTableView.reloadData()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment