Created
November 5, 2020 07:21
-
-
Save richardwei6/453e5ed5ee0f376571720fe0ccd213c4 to your computer and use it in GitHub Desktop.
This file contains 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 resetAllSettingsDefaults() { | |
let defaults = UserDefaults.standard | |
let dictionary = defaults.dictionaryRepresentation() | |
dictionary.keys.forEach { key in | |
defaults.removeObject(forKey: key) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment