Created
August 10, 2017 14:38
-
-
Save ArchieR7/9af4bda9298ce1fa558e508ff2c68563 to your computer and use it in GitHub Desktop.
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
struct User { | |
var id: String | |
var name: String | |
var age: Int | |
} | |
struct UserViewModel { | |
var title: String | |
var content: String | |
init(user: User) { | |
title = user.name | |
content = "Hi, 我是 \(user.name),今年 \(user.age) 歲!" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment