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

Getting started with associated types in Swift Protocols

Associated types in Swift work closely together with protocols. You can literally see them as an associated type of a ...
Read More
Swift

Result in Swift: Getting started with Code Examples

The Result enum is available since Swift 5 and allows us to define a success and failure case. The type ...
Read More
Swift

Constraints in Core Data Entities explained

Constraints in Core Data are part of an entity configuration. Settings like the entity name and Spotlight display name might ...
Read More
Core DataSwift

NSManagedObject events: handling state in Core Data

An NSManagedObject lifecycle goes from insertion and updates until deletion in the end. All those events come with their own ...
Read More
Core DataSwift