Last active
October 24, 2016 05:55
-
-
Save feighter09/0dbaca6333d7e142e0920e6d0cb5bb45 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
struct Person { | |
var firstName: String | |
var lastName: String | |
var age: String | |
} | |
let person = Person(firstName: "Austin", lastName: "Feight", age: -3) | |
UserDefaults.standard.set(person) | |
let fetchedPerson = UserDefaults.standard.fetch(Person.self) | |
assert(fetchedPerson == person) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment