课程: Learning Combine with Swift
今天就学习课程吧!
今天就开通帐号,24,100 门业界名师课程任您挑!
Understand the Combine life cycle
- [Instructor] It helps to take a birds-eye view of the Combine lifecycle so that you can understand how each of the actors interacts, the sequence of events, what comes before what. Let's get those answers for you and set the foundation for the remainder of the course. So we have a subscriber and a publisher. Say the publisher asynchronously calls a URL and returns data. The subscriber first subscribes to that publisher, which in turn creates a subscription that is given back to the subscriber. With the subscription in place, the subscriber can then request values from the publisher, tapping into a stream of events being returned from the publisher. Now, all subscribers conform to the cancelable protocol, allow them to cancel the subscription if there are no subscribers left. The publisher terminates as well. Sub-publishers, if defined so, could also emit a completion or failure signal causing the subscription…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。
内容
-
-
-
-
(已锁定)
Understand the Combine life cycle2 分钟 13 秒
-
(已锁定)
Transmit data with publishers5 分钟 7 秒
-
(已锁定)
Manipulate data with operators5 分钟 44 秒
-
(已锁定)
Consume data with subscribers4 分钟 5 秒
-
(已锁定)
Publish and subscribe to data with subjects4 分钟 27 秒
-
(已锁定)
Publish data once with Future and Just4 分钟 56 秒
-
(已锁定)
Challenge: Create a simple Combine data stream57 秒
-
(已锁定)
Solution: Create a simple Combine data stream2 分钟 9 秒
-
(已锁定)
-
-
-