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 |
Tags
- Clean Code
- HIG
- 스위프트
- Xcode
- collectionview
- 리펙토링
- tableView
- 클린 코드
- map
- Human interface guide
- SWIFT
- swift documentation
- uitableview
- rxswift
- ios
- uiscrollview
- 리펙터링
- 애니메이션
- Observable
- clean architecture
- ribs
- MVVM
- Refactoring
- 리팩토링
- Protocol
- swiftUI
- combine
- UITextView
- RxCocoa
- UICollectionView
Archives
- Today
- Total
목록Matching Operator (1)
김종권의 iOS 앱 개발 알아가기
[iOS - SwiftUI] Combine Matching 연산자 (contains, tryContains, allSatisfy, tryAllSatisfy)
목차) Combine - 목차 링크 Matchging 연산자 * Combine에서 제공하는 Matching 연산자는 기존 Swift에서 제공하는 연산자의 인터페이스와 동일하게 설계되어 사용하기 쉽도록 구현 contains(where:) where 클로저 조건에 따라 Bool 반환 [1,2,3,4,5].publisher .contains(where: { $0 == 3 }) .sink { print($0) } // true tryContains(where:) contains는 true를 반환하면 이후 값에 관해서 체크하지 않음을 주의 (아래에서 true를 먼저 반환하므로 throw 발생 x) [1,2,3,4,5].publisher .tryContains(where: { guard $0 != 5 else { ..
iOS Combine (SwiftUI)
2022. 11. 12. 23:46