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/7e5d9fa351a68f0bc67ea2da2889a891 to your computer and use it in GitHub Desktop.
Save iosdevben/7e5d9fa351a68f0bc67ea2da2889a891 to your computer and use it in GitHub Desktop.
struct Person {
let name: String
let address: String
}
struct ViewModel {
var person: Person
var nameAndAddress: String {
return "\(person.name), \(person.address)"
}
init() {
person = Person(name: "John 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