ReactiveCocoa
Operators
Hai Feng Kao
1
Quiz 1
What does MVVM stand for?
2
Quiz2
What are the advantages of MVVM?
3
Quiz 3
What is the speaker’s name?
4
ReactiveCocoa
Operators
Hai Feng Kao
5
Hot n Cold
• Hot Signal
• sends values regardless of
whether it has any
subscribers
• but only send values after
their their subscription time.
• Cold Signal
• defers its work and the
sending of any values until it
has a subscriber 6
Cold Signal Example
7
Hot Signal Example
8
map
9
filter
10
take
11
skip
12
skip
• RACObserve sends the current value
immediately
13
distinctUntilChanged
14
merge
15
then
16
RACSubject
17
combineLatest:reduce:
18
zip:reduce:
19
Hot n Cold
• Hot Signal
• sends values regardless of
whether it has any subscribers
• but only send values after their
their subscription time.
• Cold Signal
• defers its work and the sending
of any values until it has a
subscriber
20
Cold Signal Example
21
replay
22
replayLast
23
replayLazily
24
replay (another example)
25
replayLazily (another example)
same as replay
26
replayLast (another example)
27
Next Class
28
Q&A
Thank you
29

Reactive Cocoa Operators