You should use Combine for View-ViewModel binding in your iOS app

Photo by Federico Beccari on Unsplash
@Published var currentTemperature: Double = 16.2print($currentTemperature) // prints "Publisher(subject: Combine.PublishedSubject<Swift.Double>)"

1. Usage of Combine’s Operators

with dropFirst() we will only receive updates for future value changes

2. Multiple Subscribers

3. No Extra Code, Managed and Maintained by Apple

Photo by Quino Al on Unsplash




iOS Engineer. I love creating and learning.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Meet Async/Await

Detect Age from an Image in Swift

Build objects using block-based builder pattern in Swift

MPVolumeView iOS

SwiftUI TabView with Pagination

Publishing Apps with Apple Business Manager

Animating a UIImageView iOS

UINavigationController in iOS

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
Eilon Krauthammer

Eilon Krauthammer

iOS Engineer. I love creating and learning.

More from Medium

How to organize mock files with SPM

Creating a Service Layer in Swift

Avoid bugs in production: The use of feature flags

What is indirect enum in swift?