![]() However, before you begin playing with those examples, you first need to learn about publishers, subscribers and subscriptions. You’ll use this function to encapsulate some examples you’ll use throughout this book. Print("\n- Example of:", description, "-") It contains the following helper function example(of:): public func example(of description: String, ![]() Open Sources in the Project navigator ( View ▸ Navigators ▸ Show Project Navigator and twist down the Combine playground page), and select SupportCode.swift. Open ayground in the projects folder and you’ll see the following: Getting startedįor this chapter, you’ll use an Xcode playground with Combine imported. You can compare your work with the final version at the end or along the way if you get stuck. The starter will be prepared and ready for you to enter the code specified for each example and challenge. Note: There are starter and final versions of the playgrounds and projects you’ll use in each chapter throughout the book. By doing so, you’ll acquire important skills that you’ll use throughout the rest of this book and beyond. In this chapter, you’ll review several examples of creating publishers and subscribing to those publishers using subscribers. Now that you’ve learned some of the basic concepts of Combine, it’s time to jump in and play with two of Combine’s core components - publishers and subscribers. Custom Publishers
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |