Combine - Creating a custom subscriber

While Combine provides with a sink method that conveniently « creates the subscriber and immediately requests an unlimited number of values, prior to returning the subscriber. », the framework also enables us...

Swift - Leveraging the power of first-class functions

Functions, in Swift, are first-class citizens that can be passed as arguments, stored in properties or returned from functions. When dealing with Swift built-in functions such as map and forEach,...

Combine - share() and multicast()

Combine is designed around structs — which are value types — ensuring that a copy is made by the system whenever a resource is stored in a property (or passed...

Combine — switchToLatest()

switchToLatest() is one of the most powerful operator in Combine as it enables to switch entire publisher subscriptions on the fly while canceling the pending publisher subscription, thus switching to...

Combine — Handling UIKit’s gestures

While Combine doesn’t provide a built-in API to handle UIKit’s gestures yet, the Publisher and Subscription protocols give us the ability to create our own solution. — Creating a custom...