Hi, my name is Donny

I'm a curious, passionate iOS Developer from The Netherlands who loves learning and sharing knowledge.

Take a look at my books

Practical Swift Concurrency cover

Practical Swift Concurrency

Learn everything you need to know to make optimal use of Swift Concurrency in your applications. This book covers everything from awaiting asynchronous method calls to building your own highly concurrent systems. It’s a great introduction for those looking to familiarize themselves with everything Swift Concurrency has to offer.

Buy on Gumroad
Practical Combine thumb

Practical Combine

Practical Combine is a book aimed at intermediate to advanced developers who want to learn more about Apple's Combine framework. This book takes you all the way from the basics to building custom Combine publishers using Practical, useful examples that you can start using immediately.

Buy on Gumroad
Practical Core Data thumb

Practical Core Data

Practical Core Data is for intermediate to advanced developers who want to learn more about Core Data. Whether you're new to Core Data, or tried using it years ago, you'll find that Practical Core Data introduces you to all the essentials to get you up and running with the framework.

Buy on Gumroad

Recent articles

Jump to a random post

Adding values to the SwiftUI environment with Xcode 16’s Entry macro

July 15, 2024

Adding custom values to SwiftUI’s environment has never been very hard to do to. However, the syntax for doing it is verbose and easy to forget. To refresh your mind, take a look at this post where I explain how to add your own environment values to a SwiftUI view. To summarize what’s shown in that post; here’s how you add a custom value to the environment using Xcode 15 and earlier: private struct DateFormatterKey: EnvironmentKey { static let defaultValue:...


Let and var in Swift explained

July 12, 2024

Virtually every programming language will have some means to define properties; Swift does too. We have two approaches to defining a property in Swift. We can use a var or a let. The code below shows how we can define a var or a let as a member of a class: class Member { let id: UUID var name: String init(name: String) { self.id = UUID() self.name = name } } This class has two properties. One is a let,...


Using PreviewModifier to build a previewing environment

July 10, 2024

Xcode 16 and iOS 18 come with a feature that allows us to build elaborate preview environments using a new PreviewModifier protocol. This protocol allows us to define objects that can create a single context or environment that’s cached and used across your SwiftUI previews. This is useful because it means that you could, for example, populate a database with a bunch of mock data that is then used in your previews. You can also use PreviewModifier to apply specific...


Mixing colors in SwiftUI and Xcode 16

June 18, 2024

SwiftUI in iOS 18 and macOS 15 has gained a new trick; it can mix colors. This means that it’s now possible to take a color and modify it by applying another color to it using a provided percentage. The video below shows how this works: Notice how the large rectangle updates its color to be a certain mix of a left and right color. In the video I use distinct colors but you can also mix with white or...


Using iOS 18’s new TabView with a sidebar

June 12, 2024

In iOS 18, Apple has revamped the way that tab bars look. They used to be positioned at the bottom of the screen with an icon and a text underneath. Starting with iOS 18, tab bars will no longer be displayed in that manner. Instead, on iPad you will have your tab bar on the top of the screen with text-only items while on iPhone your tab bar will retain its old look. In addition to changing how a tab...


Building a stretchy header view with SwiftUI on iOS 18

June 11, 2024

In iOS 18, SwiftUI's ScrollView has gotten lots of love. We have several new features for ScrollView that give tons of control to us as developers. One of my favorite interactions with scroll views is when I can drag on a list an a header image animates along with it. In UIKit we'd implement a UIScrollViewDelegate and read the content offset on scroll. In SwiftUI we could achieve the stretchy header effect with GeometryReader but that's never felt like a...