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

Getting started with Property Wrappers in Swift

Property Wrappers in Swift allow you to extract common logic in a distinct wrapper object. Since the introduction during WWDC ...
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

How to use the #available attribute in Swift

Marking pieces of code as available per platform or version is required in the ever changing landscape of app development ...
Read More
Swift

Try Catch Throw: Error Handling in Swift with Code Examples

Try catch in Swift combined with throwing errors make it possible to nicely handle any failures in your code. A ...
Read More
Swift

How-to use Diffable Data Sources with Core Data

Diffable Data Sources were introduced at WWDC 2019 as a replacement for UICollectionViewDataSource and UITableViewDataSource. The API is available on ...
Read More
Core DataSwift