SlideShare ist ein Scribd-Unternehmen logo
1 von 29
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

Weitere ähnliche Inhalte

Andere mochten auch

ReactiveCocoa in Practice
ReactiveCocoa in PracticeReactiveCocoa in Practice
ReactiveCocoa in PracticeOutware Mobile
 
Learn You a ReactiveCocoa for Great Good
Learn You a ReactiveCocoa for Great GoodLearn You a ReactiveCocoa for Great Good
Learn You a ReactiveCocoa for Great GoodJason Larsen
 
ReactiveCocoa Goodness - Part I of II
ReactiveCocoa Goodness - Part I of IIReactiveCocoa Goodness - Part I of II
ReactiveCocoa Goodness - Part I of IImanuelmaly
 
不能說的Dependency injection
不能說的Dependency injection不能說的Dependency injection
不能說的Dependency injectionHai Feng Kao
 
Cocoapods多人協做
Cocoapods多人協做Cocoapods多人協做
Cocoapods多人協做Hai Feng Kao
 
Reactive Cocoa Unknown Frontier
Reactive Cocoa Unknown FrontierReactive Cocoa Unknown Frontier
Reactive Cocoa Unknown FrontierHai Feng Kao
 
Reactive cocoa 101
Reactive cocoa 101Reactive cocoa 101
Reactive cocoa 101Hai Feng Kao
 
Reactive Cocoa && MVVM
Reactive Cocoa && MVVMReactive Cocoa && MVVM
Reactive Cocoa && MVVMHai Feng Kao
 
CGRectDivide(everything)
CGRectDivide(everything)CGRectDivide(everything)
CGRectDivide(everything)manuelmaly
 
Intro to ReactiveCocoa
Intro to ReactiveCocoaIntro to ReactiveCocoa
Intro to ReactiveCocoakleneau
 
105-2 iOS程式設計(四)
105-2 iOS程式設計(四)105-2 iOS程式設計(四)
105-2 iOS程式設計(四)Hao Lee
 

Andere mochten auch (11)

ReactiveCocoa in Practice
ReactiveCocoa in PracticeReactiveCocoa in Practice
ReactiveCocoa in Practice
 
Learn You a ReactiveCocoa for Great Good
Learn You a ReactiveCocoa for Great GoodLearn You a ReactiveCocoa for Great Good
Learn You a ReactiveCocoa for Great Good
 
ReactiveCocoa Goodness - Part I of II
ReactiveCocoa Goodness - Part I of IIReactiveCocoa Goodness - Part I of II
ReactiveCocoa Goodness - Part I of II
 
不能說的Dependency injection
不能說的Dependency injection不能說的Dependency injection
不能說的Dependency injection
 
Cocoapods多人協做
Cocoapods多人協做Cocoapods多人協做
Cocoapods多人協做
 
Reactive Cocoa Unknown Frontier
Reactive Cocoa Unknown FrontierReactive Cocoa Unknown Frontier
Reactive Cocoa Unknown Frontier
 
Reactive cocoa 101
Reactive cocoa 101Reactive cocoa 101
Reactive cocoa 101
 
Reactive Cocoa && MVVM
Reactive Cocoa && MVVMReactive Cocoa && MVVM
Reactive Cocoa && MVVM
 
CGRectDivide(everything)
CGRectDivide(everything)CGRectDivide(everything)
CGRectDivide(everything)
 
Intro to ReactiveCocoa
Intro to ReactiveCocoaIntro to ReactiveCocoa
Intro to ReactiveCocoa
 
105-2 iOS程式設計(四)
105-2 iOS程式設計(四)105-2 iOS程式設計(四)
105-2 iOS程式設計(四)
 

Kürzlich hochgeladen

BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort ServiceDelhi Call girls
 
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual serviceanilsa9823
 
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCRFULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCRnishacall1
 
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost LoverPowerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost LoverPsychicRuben LoveSpells
 
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun serviceCALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun serviceanilsa9823
 
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,Pooja Nehwal
 
9892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x79892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x7Pooja Nehwal
 

Kürzlich hochgeladen (7)

BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
 
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
 
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCRFULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
 
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost LoverPowerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
 
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun serviceCALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
 
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
 
9892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x79892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x7
 

Reactive Cocoa Operators