Getting started with the Combine framework in Swift

Combine was introduced as a new framework by Apple at WWDC 2019. The framework provides a declarative Swift API for ...
Read More
CombineSwift

How to test optionals in Swift with XCTest

Optionals types in Swift either have a value or not, and there are several ways to test optionals using the ...
Read More
Swift

How to use the rethrows keyword in Swift

Rethrows in Swift allows forwarding a thrown error by a given function parameter. It's used a lot in methods like ...
Read More
Swift

How to use @autoclosure in Swift to improve performance

@autoclosure in Swift is a type of closure that allows to omit braces and make it look like a normal ...
Read More
Swift

How and when to use Lazy Collections in Swift

Lazy collections are similar to a regular collection but change the way how modifiers like map, filter, and reduce are ...
Read More
Swift

How to use Variadic parameters in Swift

Variadic parameters make it possible to pass zero or more values of a specific type into a function. It can ...
Read More
Swift

Result builders in Swift explained with code examples

Result builders in Swift allow you to build up a result using 'build blocks' lined up after each other. They ...
Read More
Swift

XCTExpectFailure: Expected test failures explained with code examples

XCTExpectFailure was introduced in Xcode 12.5 and allows marking test failures as expected. The first time I read about this ...
Read More
Swift

Lazy var in Swift explained with code examples

A lazy var is a property whose initial value is not calculated until the first time it's called. It's part ...
Read More
Swift

Closures in Swift explained with Code Examples

Closures in Swift can be challenging to understand with types like trailing closures, capturing lists, and shorthand syntaxes. They're used ...
Read More
Swift

What is a Computed Property in Swift?

Computed properties are part of a family of property types in Swift. Stored properties are the most common which save ...
Read More
Swift

SwiftLee 2020 In Review: Most read blog posts

Every year I'm looking back at what I achieved with SwiftLee as well as what I want to achieve in ...
Read More
Swift