Publisher
Publisherλ μκ°μ΄ μ§λ¨μ λ°λΌ κ°μ μνμ€λ₯Ό μ λ¬ν μ μλ€.
Combineμμ Publisher
λ νλ‘ν μ½λ‘ μ μλμ΄ μμΌλ©°, λ€μμ νμ
μ΄ μ΄ νλ‘ν μ½μ μ±ννλ€.
Publishers
μ΄κ±°νμ μ€μ²© νμ μΌλ‘ μ μλ μ¬λ¬ ꡬ쑰체Just
,Empty
μ κ°μ Convenience Publisherνμ μ μ§μ΄ PublisherμΈ
AnyPublisher
ꡬ쑰체λ±λ±
λ κ°μ μ°κ΄ νμ μ΄ μ μλμ΄ μλ€.
첫 λ²μ§Έ μ°κ΄ νμ μ κ°μ νμ (
Output
)μ΄λ€.λ λ²μ§Έ μ°κ΄ νμ μ μλ¬μ νμ (
Failure
)μ΄λ€.μλ¬μ νμ μ
Error
νλ‘ν μ½μ μ±νν΄μΌ νλ€.
Publisher
νλ‘ν μ½μ μ΅μ€ν
μ
μΌλ‘ μ¬λ¬ μ€νΌλ μ΄ν°operatorκ° μ μλμ΄ μμΌλ©°, μ΄λ₯Ό μ¬μ©ν΄μ μ΄λ²€νΈ μ²λ¦¬ 체μΈμ ꡬμ±ν μ μλ€.
κ° μ€νΌλ μ΄ν°λ Publisher
νλ‘ν μ½μ ꡬννλ νμ
μ λ°ννλ€.
κΈ°λ³Έμ μΌλ‘ Publisher
νλ‘ν μ½μ μ€νΌλ μ΄ν°μ μ΄λ¦κ³Ό κ·Έκ²μ΄ λ°ννλ Publisherμ μ΄λ¦μ λΉμ·νκ² λ§λ€μ΄ λμμΌλ, μ΄ νλ‘ν μ½μ μ±ννλ κ°λ³ Publisherλ μ€νΌλ μ΄ν°κ° λ€λ₯Έ νμ
μ Publisherλ₯Ό λ°ννκ² κ΅¬νν΄λ μ μλ€.
Publisher
νλ‘ν μ½μ μ΅μ€ν
μ
μΌλ‘ μ¬λ¬ μ€νΌλ μ΄ν°κ° ꡬνλμ΄ μμΌλ, Just
μ κ°μ κ°λ³ Publisherκ° μ€νΌλ μ΄ν°λ₯Ό μ€λ²λ‘λ©νμ¬ λ€λ₯Έ νμ
μ λ°ννλλ‘ κ΅¬νν κ²½μ°λ₯Ό μ΄λ ΅μ§ μκ² μ°Ύμλ³Ό μ μλ€.
RxSwift
μΌλ°μ μΌλ‘ Publisher
νλ‘ν μ½μ ꡬννλ νμ
μ RxSwiftμ Observable
κ³Ό λΉκ΅ κ°λ₯νλ€.
μλ¬ μ°κ΄ νμ
μ΄ Never
λ‘ μλ¬ κ°μ μ λ¬νμ§ μλλ€λ κ²μ΄ 보μ₯λλ κ²μ RxCocoaμ Driver
μ λΉκ΅ κ°λ₯νλ€.
νλμ κ°μ μ λ¬νκ³ μ’
λ£νκ±°λ, μλ¬λ₯Ό λ΄κ³ μ’
λ£νλ Single
μ λμμ Combineμ Future
Publisherλ₯Ό μ¬μ©νμ¬ κ΅¬νν μ μλ€.
Completable
, Maybe
μ κ°μ RxSwiftμ Traitsλ Combineμ λ³λμ νμ
μΌλ‘ ꡬνλμ΄ μμ§ μλ€.
ReactiveSwift
μΌλ°μ μΌλ‘ Publisher
νλ‘ν μ½μ ꡬννλ νμ
μ ReactiveSwiftμ SignalProducer
μ Signal
κ³Ό λΉκ΅ κ°λ₯νλ€.
SignalProducer
λ 'Cold Observable', Signal
μ 'Hot Observable'μ μλ―Ένλλ°, Combineμμλ μ΄ λμμ λ³λμ νμ
μΌλ‘ ꡬλΆνμ§ μλλ€.
Publisherμ Operator μ
Convenience Publishers
Publisher in Publishers Enum
Convenience Publishers
Working with Subscribers
Mapping Elements
Filtering Elements
Publisher
κ΄λ ¨ Operator
compactMap
filter
removeDuplicates
replaceEmpty
replaceError
tryCompactMap
tryFilter
tryRemoveDuplicates
Reducing Elements
Publisher
κ΄λ ¨ Operator
collect
collect
collect
ignoreOutput
reduce
tryReduce
Applying Mathematical Operations on Elements
Applying Matching Criteria to Elements
Publisher
κ΄λ ¨ Operator
tryAllSatisfy
allSatisfy
contains
contains
tryContains
Applying Sequence Operations to Elements
Publisher
κ΄λ ¨ Operator
first
last
drop
drop
tryDrop
append
/ prepend
dropFirst
prefix
prefix
first
last
tryFirst
tryLast
tryPrefix
output
Combining Elements from Multiple Publishers
Publisher
κ΄λ ¨ Operator
combineLatest
combineLatest
combineLatest
merge
merge
merge
merge
merge
merge
merge
merge
zip
zip
zip
Handling Errors
Adapting Publisher Types
Publisher
κ΄λ ¨ Operator
switchToLatest
Controlling Timing
Publisher
κ΄λ ¨ Operator
debounce
delay
measureInterval
throttle
timeout
Creating Reference-type Publishers
Publisher
κ΄λ ¨ Operator
Share
share
Encoding and Decoding
Identifying Properties with Key Paths
Using Explicit Publisher Connections
Publisher
κ΄λ ¨ Operator
Autoconnect
autoconnect
Working with Multiple Subscribers
Publisher
κ΄λ ¨ Operator
Multicast
multicast
Buffering Elements
Publisher
κ΄λ ¨ Operator
Buffer
buffer
Adding Explicit Connectability
Publisher
κ΄λ ¨ Operator
MakeConnectable
makeConnectable
Debugging
Misc.
Publisher
κ΄λ ¨ Operator
eraseToAnyPublisher
NotificationCenter.Publisher
-
Timer.TimerPublisher
-
Last updated