Created
May 27, 2019 08:55
-
-
Save AppleCEO/fa487edbfc863fa16eb13339d2c3980f 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 TV { | |
var channel: Int = 1 | |
var brand: String | |
init(channel: Int) { | |
self.channel = channel | |
self.brand = "LG" | |
} | |
init() { | |
self.init(channel: 15) | |
} | |
} | |
var tv = TV() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment