Skip to content

Instantly share code, notes, and snippets.

@iosdevben
Last active November 11, 2016 05:15
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 iosdevben/8e9b67eb4882897b939be89089d0d17f to your computer and use it in GitHub Desktop.
Save iosdevben/8e9b67eb4882897b939be89089d0d17f to your computer and use it in GitHub Desktop.
struct ViewModel {
var person: Person
var nameAndAddress: String {
return "\(person.firstName)\(person.lastName), \(person.address)"
}
init() {
person = Person(firstName: "John",
lastName: "Appleseed",
address: "1 Infinite Loop, Cupertino, CA")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment