Created
November 24, 2015 16:09
-
-
Save ctrevarthen/092d84103efb75c922e3 to your computer and use it in GitHub Desktop.
ShopQuick - Priorities Manager Reset
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
| let resetKey = "com.detroitlabs.shopfast.ResetPriorities" | |
| func checkForResetTrigger() { | |
| let userDefaults = NSUserDefaults.standardUserDefaults() | |
| let shouldReset = userDefaults.boolForKey(resetKey) | |
| if shouldReset { | |
| self.products = [] | |
| userDefaults.removeObjectForKey(self.productsKey) | |
| userDefaults.setBool(false, forKey: resetKey) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment