From the course: Learning Combine with Swift
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Challenge: Create a simple Combine data stream - Swift Tutorial
From the course: Learning Combine with Swift
Challenge: Create a simple Combine data stream
(upbeat music) - [Instructor] In your first challenge, to tie in your understanding of the chapter, we'll create a simple playground that will consist of a publisher, subscriber and operator. You will start off by creating a publisher that will emit the values of a preset Boolean array. You will then create a counterpart subscriber that will listen for that broadcast and assign the results to a preset text field is enabled properly. To enable or disable bad text fields. Finally, you will create an operator that will drop the first two elements from that broadcast. I know this is a bit of a contrived use case, but it will demonstrate some of the basics from this chapter in preparation for the videos ahead. Switch to Xcode and select the exercise playground file. Good luck.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Understand the Combine life cycle2m 13s
-
(Locked)
Transmit data with publishers5m 7s
-
(Locked)
Manipulate data with operators5m 44s
-
(Locked)
Consume data with subscribers4m 5s
-
(Locked)
Publish and subscribe to data with subjects4m 27s
-
(Locked)
Publish data once with Future and Just4m 56s
-
(Locked)
Challenge: Create a simple Combine data stream57s
-
(Locked)
Solution: Create a simple Combine data stream2m 9s
-
(Locked)
-
-
-