Problem Solving with Combine Swift

Arlind Aliu
Jul 10, 2019 · 7 min read
Image for post
Image for post

Introduction

Getting in Reactive Mindset

Image for post
Image for post
Button Taps Over Time

Combine Swift Essentials

1. Publishers and Subscribers

OUTPUT:
Combine Swift
OUTPUT:
Combine Swift
finished
subscriber.cancel()

2. Subjects

3. Operators

Image for post
Image for post
OUTPUT:
10
20
30
Image for post
Image for post
Image for post
Image for post
OUTPUT: 
Munich is a city in europe
Berlin is a city in europe
Milano is a city in europe
Rome is a city in europe
Image for post
Image for post
Image for post
Image for post
Output:
1
3
6
10
15

4. Schedulers

Solving Practical Problems

Notification Centre Publishers

Chaining Asynchronous Calls

Performing Multiple Asynchronous Calls

Evaluating Solutions

Image for post
Image for post
Execution Time In Seconds
Image for post
Image for post
Heap Allocations in Kilobytes

In Conclusion

Flawless iOS

🍏 Community around iOS development, mobile design, and…

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store