没有合适的资源?快使用搜索试试~ 我知道了~
首页Functional Reactive Programming on iOS.pdf
Functional Reactive Programming on iOS.pdf
需积分: 9 179 浏览量
更新于2023-05-27
评论
收藏 2.59MB PDF 举报
Functional Reactive Programming on iOS.pdf
资源详情
资源评论
资源推荐


Functional Reactive Programming on iOS
Functional reactive programming introduction using
ReactiveCocoa
Ash Furrow
This book is for sale at http://leanpub.com/iosfrp
This version was published on 2014-01-05
This is a Leanpub book. Leanpub empowers authors and publishers with the Lean Publishing
process. Lean Publishing is the act of publishing an in-progress ebook using lightweight tools and
many iterations to get reader feedback, pivot until you have the right book and build traction once
you do.
©2013 - 2014 Ash Furrow

Also By Ash Furrow
Your First iOS 7 App

Contents
Acknowledgements ....................................... i
Philosophy ............................................. 1
Functional Reactive Programming ............................... 1
Conclusion ............................................ 2
Functional Programming with RXCollections ......................... 3
Higher-Order Functions ..................................... 3
Installing RXCollections .................................... 4
Map ............................................... 6
Filter ............................................... 7
Fold ............................................... 8
Performance ........................................... 8
Conclusion ............................................ 9
Introduction to ReactiveCocoa .................................. 10
Installing ReactiveCocoa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Streams and Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Subscriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Deriving State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
RACSubject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Hot and Cold Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Multicasting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
ReactiveCocoa in Practice .................................... 23
Basics of FunctionalReactivePixels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Adding to FunctionalReactivePixels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Revisiting FunctionalReactivePixels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Network Layer Revisited . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Model View View-Model on iOS ................................. 62

CONTENTS
What is MVVM? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Revisiting Functional Reactive Pixels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
MVVM in Practice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Testing View Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Final Thoughts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
剩余90页未读,继续阅读
















安全验证
文档复制为VIP权益,开通VIP直接复制

评论0