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