Skip to content

Instantly share code, notes, and snippets.

@feighter09
Last active October 24, 2016 06:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save feighter09/d3bcfc038b6ab0304af6909d6816a9a2 to your computer and use it in GitHub Desktop.
Save feighter09/d3bcfc038b6ab0304af6909d6816a9a2 to your computer and use it in GitHub Desktop.
let defaults = Defaults()
let person = Person(firstName: "Austin", lastName: "Feight", age: -3)
defaults.save(person)
let fetched: Person? = defaults.fetch(Person.self)
print("\(fetched!.firstName) \(fetched!.lastName) is \(fetched!.age) years old")
// Output: Austin Feight is -3 years old
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment