Last active
November 19, 2015 03:37
-
-
Save ctrevarthen/ce8eb0698eaba854f188 to your computer and use it in GitHub Desktop.
ShopQuick - Favorites VC Left Buttons
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.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