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
- uitableview
- Clean Code
- Refactoring
- UICollectionView
- uiscrollview
- SWIFT
- swiftUI
- Observable
- combine
- 클린 코드
- Protocol
- 스위프트
- collectionview
- rxswift
- MVVM
- Human interface guide
- swift documentation
- ios
- HIG
- 리펙토링
- clean architecture
- RxCocoa
- 애니메이션
- ribs
- map
- tableView
- 리팩토링
- 리펙터링
- UITextView
- Xcode
Archives
- Today
- Total
목록optional binding (1)
김종권의 iOS 앱 개발 알아가기
[iOS - swift] Optional binding, Optional Chaining
Optional Binding 조건문과 함께 Optional을 unWrapping할 수 있는 것 보통 흔한 것은 guard, if문이지만 switch문도 optional binding에 속하는 것 주의 switch 문에 대한 Optional binding let t1 = Optional(1) switch t1 { case 0: print(0) case 1: print(1) // 실행 default: print(nil) } let t2 = Optional(nil) switch t2 { case 0: print(0) case 1: print(1) default: print(nil) // 실행 } Optinoal Chaining 하위 property에 optional 값이 있는지 연속적으로 체크하면서 하나라도..
iOS 기본 (swift)
2021. 1. 14. 22:27