Swift
-
Lazy Stored Properties카테고리 없음 2020. 5. 6. 23:28
A lazy stored property is a property whose initial value is not calculated until the first time it is used. You indicate a lazy stored property by writing the lazy modifier before its declaration. lazy 저장 프로퍼티의 값은 처음 사용되기 전까지는 계산되지 않습니다. lazy로 선언해주려면 "lazy var something " var(변수) 앞에 lazy를 선언해주면 됩니다. NOTE You must always declare a lazy property as a variable (with the var keyword), because its in..