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
- 클린 코드
- 리팩토링
- scrollview
- ios
- swiftUI
- UITextView
- 애니메이션
- 리펙토링
- Refactoring
- map
- Xcode
- uiscrollview
- uitableview
- Human interface guide
- Protocol
- collectionview
- 스위프트
- Observable
- combine
- SWIFT
- HIG
- RxCocoa
- rxswift
- clean architecture
- UICollectionView
- MVVM
- tableView
- ribs
- swift documentation
- Clean Code
Archives
- Today
- Total
목록tryReduce (1)
김종권의 iOS 앱 개발 알아가기
[iOS - SwiftUI] Combine Reducing 연산자 (collect, ignoreOutput, reduce, tryReduce)
목차) Combine - 목차 링크 Reduce 배열과 같은 Sequence형태를 하나의 값이나 축소 시키는 연산자 collect 연산자 collect(n)이면 n 만큼 묶어서 방출 (0...10).publisher .collect(5) .sink { print($0) } /* [0, 1, 2, 3, 4] [5, 6, 7, 8, 9] [10] */ ignoreOutput() 값이 방출되는 값은 모두 무시하고 completion의 failure만 방출 struct NoZeroValuesAllowedError: Error {} let numbers = [1, 2, 3, 4, 5, 0, 6, 7, 8, 9] numbers.publisher .tryFilter({ anInt in guard anInt != 0 ..
iOS Combine (SwiftUI)
2022. 11. 9. 23:30