Simplify your protocol dependencies using functions
Our code is full of dependencies. We couldn’t write very useful applications without them! When it comes to swapping in different implementations, the first tool that likely springs to mind is protocols.
Cancel in-flight network requests using Combine
A common requirement for many apps is to cancel a running network request that has not yet completed, if a new request to the same resource is made. This is extremely simple using the power of reactive programming.
A better way to structure Combine with UIKit in MVVM
Combine and SwiftUI work beautifully together. But how can Combine be used to work with reactive code in our UIKit projects?
Unit Testing basics: what exactly should you test?
If you’re new to Swift development and wondering how to get started writing tests, or you’ve been coding in Swift for some time but aren’t quite sure what parts of your code need to be tested, this post is for you.
Check an enum case without a switch statement
Enumerations are great when you need to define a common type with multiple related values in a type-safe manner. Often you’ll process these using a switch statement, but how do you check for a specific case without using a switch statement?
How to bind button taps from custom cells to your view model
RxCocoa provides a useful stream for cell item accessory button taps. But how do you generate your own reactive streams from buttons in custom cells? And how should these streams be connected to your view model logic?
Start learning RxSwift today with these 6 steps
Getting to grips with RxSwift is not easy. There is a significant learning curve as you adjust your imperative mindset to a functional reactive one, with many new concepts to learn. So how do you get started?
Is it worth learning RxSwift in 2021?
Does this sound like you...you’re a good developer with years of experience building and shipping apps to the App Store. Somehow though, you never quite managed to get onboard the functional reactive programming train in the back half of the “twenty-tens” (2015 - 2019), and now we have Combine. Should you learn RxSwift today?
Convert array types using the map operator in Combine
In reactive programming, it's very common to require a stream of values in the form of an array. A typical use case for this is to populate a list with data. However, the array that is published from the source may need to be transformed to an array of values of a different type for display.
Neatly organise complex views with a UIView subclass
Creating views programatically helps us avoid some of the pitfalls of Storyboards and Interface Builder. But what is the best way to organise complex view hierarchies?