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