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 | 31 |
Tags
- 리펙토링
- 리팩토링
- UITextView
- Refactoring
- collectionview
- HIG
- rxswift
- Protocol
- ribs
- ios
- 리펙터링
- swift documentation
- Human interface guide
- Clean Code
- RxCocoa
- Xcode
- UICollectionView
- swiftUI
- 애니메이션
- clean architecture
- MVVM
- 클린 코드
- map
- 스위프트
- uitableview
- SWIFT
- uiscrollview
- Observable
- combine
- tableView
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