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
- HIG
- Protocol
- 클린 코드
- 리펙토링
- 리팩토링
- MVVM
- Xcode
- combine
- 애니메이션
- SWIFT
- ios
- UICollectionView
- RxCocoa
- map
- collectionview
- uitableview
- UITextView
- swiftUI
- Refactoring
- clean architecture
- Clean Code
- tableView
- Human interface guide
- 스위프트
- ribs
- 리펙터링
- rxswift
- uiscrollview
- swift documentation
- Observable
Archives
- Today
- Total
목록편의 초기화 (1)
김종권의 iOS 앱 개발 알아가기
[iOS - swift] Designated init, Convenience init, 초기화의 핵심, 초기화 상속
초기화의 핵심 초기화 종류는 2가지 (Designated, convenience) 초기화의 목적: 모든 멤버 초기화 (1단계) + 상속받은 멤버들 customizing (2단계) Designated initializer (지정 초기자) 클래스의 모든 프로퍼티를 초기화 해야함 클래스 타입은 반드시 한 개 이상의 지정 초기자가 필요 init(parameters) { statements } Convenience initializer (편의 초기자) 옵셔널 Convenience init 내부에서 반드시 Designated Init이 호출되어야 함 (self.init()) convenience init(parameters) { self.init() statements } 초기화 규칙 - 모든 멤버가 초기화 되어야..
iOS 기본 (swift)
2020. 11. 26. 01:08