Recent articles

Jump to a random post

Ternary operator in Swift explained

Published on: July 7, 2025

The ternary operator is one of those things that will exist in virtually any modern programming language. When writing code, a common goal is to make sure that your code is succinct and no more verbose than it needs to be. A ternary expression is a useful tool to achieve this. What is a ternary? Ternaries are essentially a quick way to write an if statement on a single line. For example, if you want to tint a SwiftUI button based on a specific condition, your code might look a bit as follows: struct SampleView: View { @State var username...

Read more...

Supporting Universal Links on iOS

Published on: July 4, 2025

Allowing other apps and webpages to link into your app with deeplinks is a really good way for you to make your app more flexible, and to ensure that users of your app can more easily share content with others by sharing direct links to your contents. To support deeplinking on iOS, you have two options available: Support deeplinking through custom URL schemes like maxine://workout/dw-1238-321-jdjd Support deeplinking through Universal Links which would look like this https://donnywals.com/maxine-app/workout/dw-1238-321-jdjd To add support for option one, all you need to do is register your custom URL scheme and implement onOpenURL to handle the incoming...

Read more...

Grouping Liquid Glass components using glassEffectUnion on iOS 26

Published on: July 2, 2025

On iOS 26 we have lots of new ways to reimagine our UIs with Liquid Glass. This means that we can take a look at Apple’s built-in applications and find interesting applications of Liquid Glass that we can use to enhance our understanding of how Liquid Glass components can be built, and to understand what Apple considers to be good practice for Liquid Glass interfaces. In this post, we’re going to replicate a control that’s part of the new maps app. It’s a vertical stack of two buttons in a single Liquid Glass container. Here’s what the component looks like...

Read more...

Designing custom UI with Liquid Glass on iOS 26

Published on: July 1, 2025

Liquid Glass is iOS 26’s new design language. This means that a lot of apps will be adopting a new UI philosophy that might require some significant changes to how you’re designing your app’s UI. If you’re not ready to adopt Liquid Glass just yet, Apple has provided you an escape hatch that should be usable until the next major iOS release. I recently explored updating my workout app Maxine to work well with Liquid Glass tab bars which you can learn more about here. In this post, I’d like to explore how we can build custom Liquid Glass components...

Read more...

Solving actor-isolated protocol conformance related errors in Swift 6.2

Updated on: July 7, 2025

Swift 6.2 comes with several quality of life improvements for concurrency. One of these features is the ability to have actor-isolated conformances to protocols. Another feature is that your code will now run on the main actor by default. This does mean that sometimes, you’ll run into compiler errors. In this blog post, I’ll explore these errors, and how you can fix them when you do. Before we do, let’s briefly talk about actor-isolated protocol conformance to understand what this feature is about. Understanding actor-isolated protocol conformance Protocols in Swift can require certain functions or properties to be nonisolated. For...

Read more...

What is @concurrent in Swift 6.2?

Updated on: July 7, 2025

Swift 6.2 is available and it comes with several improvements to Swift Concurrency. One of these features is the @concurrent declaration that we can apply to nonisolated functions. In this post, you will learn a bit more about what @concurrent is, why it was added to the language, and when you should be using @concurrent. Before we dig into @concurrent itself, I’d like to provide a little bit of context by exploring another Swift 6.2 feature called nonisolated(nonsending) because without that, @concurrent wouldn’t exist at all. And to make sense of nonisolated(nonsending) we’ll go back to nonisolated functions. Exploring nonisolated...

Read more...

Exploring tab bars on iOS 26 with Liquid Glass

Updated on: July 7, 2025

When your app has a tab bar and you recompile it using Xcode 26, you will automatically see that your tab bar has a new look and feel based on Liquid Glass. In this blog post, we’ll explore the new tab bar, and which new capabilities we’ve gained with the Liquid Glass redesign. By the end of this post you’ll have a much better sense of how Liquid Glass changes your app’s tab bar, and how you can configure the tab bar to really lean into iOS 26’s Liquid Glass design philosophy. Tab Bar basics in iOS 26 If you’ve...

Read more...

Opting your app out of the Liquid Glass redesign with Xcode 26

Published on: June 10, 2025

On iOS 26, iPadOS 26 and more, your apps will take on a whole new look based on Apple's Liquid Glass redesign. All you need to do to adopt this new style in your apps is recompile. Once recompiled, your app will have all-new UI components which means your app will look fresh and right at home in Apple's latest OS. That said, there are many reasons why you might not want to adopt Liquid Glass just yet. It's a big redesign and for lots of apps there will be work to do to properly adapt your designs to fit...

Read more...

Setting default actor isolation in Xcode 26

Published on: June 10, 2025

With Swift 6.2, Apple has made a several improvements to Swift Concurrency and its approachability. One of the biggest changes is that new Xcode projects will now, by default, apply an implicit main actor annotation to all your code. This essentially makes your apps single-threaded by default. I really like this change because without this change it was far too easy to accidentally introduce loads of concurrency in your apps. In this post I'd like to take a quick look at how you can control this setting as well as the setting for nonisolated(nonsending) from Xcode 26's build settings menu....

Read more...

Exploring concurrency changes in Swift 6.2

Updated on: June 26, 2025

It's no secret that Swift concurrency can be pretty difficult to learn. There are a lot of concepts that are different from what you're used to when you were writing code in GCD. Apple recognized this in one of their vision documents and they set out to make changes to how concurrency works in Swift 6.2. They're not going to change the fundamentals of how things work. What they will mainly change is where code will run by default. In this blog post, I would like to take a look at the two main features that will change how your...

Read more...