Created
April 7, 2017 08:39
-
-
Save rcerrejon/da9ec81145479c648b533631dd6a37ea to your computer and use it in GitHub Desktop.
UserSettings in Swift 3
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
// inside the Class outside function | |
let userSettings = UserDefaults.standard | |
// Setter | |
userSettings.set("foo", forKey: "foobar") | |
// Getter | |
let foo = userSettings.string(forKey: "foobar") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment