일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- moya
- 입력
- ReactorKit
- UIResponder
- AVCaptureSession
- 공백
- readLine
- delays deallocation
- URLSession
- reversed
- ios
- DISPATCH
- Responder chain
- 사내배포
- Asnyc
- binder
- RxSwift
- MaxHeap
- UserDefaults
- input
- Custom Class
- 전자출입
- weak self
- Python
- hitTest
- vtable
- async
- BidirectionalCollection
- Combine
- swift
- Today
- Total
목록Combine (3)
틈틈히 적어보는 개발 일기
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/SsSyJ/btsdtFWkyFX/ERVG9Cz00MsBEyNyDpDLRk/img.png)
Filtering basics 💡 기본적으로 filter {...} 의 효과와 동일함! 클로저 내부 결과(Bool)가 true이면 스트림이 지속되고, false라면 스트림이 걸러지게 됨 ⭐️removeDuplicates() RxSwift의 distinctUntilChanged() 와 동일 이전과 동일한 값이 방출될경우 해당 스트림을 필터링 함 Compacting and ignoring 💡 종종 publisher가 Optional 값을 방출하는 경우가 있거나 이벤트가 nil을 반환하는 경우가 있다! 이러한 이벤트를 다뤄보도록 하자 compactMap 클로저 내부 값이 대해 Optional이면 본래의 값을, nil 이라면 해당 이벤트를 방출하지 않음 ignoreOutput() 모든 이벤트를 무시함. 단 co..
Hello Publisher publisher는 두가지 이벤트를 방출함 값 (as element) completion event Hello Subscriber Subscribing with sink(_: _:) RxSwift의 subscribe(onNext: ) 와 동일 // Code Just(["myung", "sub"]) .sink(receiveCompletion: { print("오늘 스터디는?? \\($0)") }, receiveValue: { print("스터디 참가자: \\($0)") }) // Result 스터디 참가자: ["myung", "sub"] 오늘 스터디는?? finished Subscribing with assign(to:on:), assign(to: ) KVO 방식으로 값을 할당..
애플이 말하는 컴바인이란? “The Combine framework provides a declarative approach for how your app processes events. Rather than potentially implementing multiple delegate callbacks or completion handler closures, you can create a single processing chain for a given event source. Each part of the chain is a Combine operator that performs a distinct action on the elements received from the previous step.” - ..