Last active
November 19, 2015 03:38
-
-
Save ctrevarthen/f161b391eae8c5420c63 to your computer and use it in GitHub Desktop.
ShopQuick - Shopping List Manager - DRY
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
class ShoppingListManager : ProductManager { | |
static let sharedInstance = ShoppingListManager() | |
override init() { | |
super.init() | |
self.productsKey = "com.detroitlabs.shopfast.products" | |
self.loadProductsFromDefaults() | |
} | |
func markPurchasedAtIndex(index: Int) { | |
self.products[index].purchased = true | |
self.saveProductsToDefaults() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment