Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
Tags
- MVVM
- Protocol
- UICollectionView
- Refactoring
- swiftUI
- swift documentation
- collectionview
- HIG
- SWIFT
- 스위프트
- rxswift
- uiscrollview
- ios
- tableView
- uitableview
- 리팩토링
- ribs
- UITextView
- 리펙토링
- 리펙터링
- Observable
- Clean Code
- RxCocoa
- 클린 코드
- Human interface guide
- clean architecture
- Xcode
- 애니메이션
- map
- combine
Archives
- Today
- Total
목록willset (1)
김종권의 iOS 앱 개발 알아가기
[iOS - swift] (프로퍼티 구분) Stored Property vs Computed Property
Stored Property vs Computed Property Stored Property는 초기화 값이 존재하는 프로퍼티 Computed Property는 최가화 값이 존재하지 않는 프로퍼티 - 예시) p1은 초기화 값이 존재하므로 Stored Property p2는 초기화 값이 존재하지 않으므로 Computed Property p3는 바로 초기화값이 존재하지 않지만 init구문에서 p3를 초기화해주므로 Stored Property class PropertyTest { // 1 var p1: Int = 1 // 2 var p2: Int { get { return p1 + 2 } set { print(newValue) } } // 3 var p3: Int { didSet { print(p3) } } ..
iOS 기본 (swift)
2021. 6. 19. 13:56