Yielding and debouncing in Swift Concurrency

I decided to continue the topic of Swift Concurrency to cover some not-obvious things. This week we will talk about task yielding and debouncing. Swift concurrency language features provide us with two simple but very powerful functions: yield and sleep. We will try to learn how and when to use them.

Task Cancellation in Swift Concurrency

Swift Concurrency provides a cooperative cancellation model to handle task cancellation. This week, we will learn what a cooperative cancellation model is, how to use it, and how to be a good citizen and handle it correctly.

Mastering TaskGroups in Swift

Swift Structured Concurrency makes our lives much easier by introducing task groups. Task groups are a way to run a dynamic number of child tasks, await all of them, or cancel. This week, we will learn how to use and optimize task groups in Swift.

Container relative frames in SwiftUI

The easiest way to size a view in SwiftUI is to place it in a container and allow it to fit its content size. You can also use the frame view modifier to specify a particular concrete size. Anything related to the size of its parent needs hard work using GeometryReader, which is not the easiest way to do things correctly in SwiftUI.

Color mixing in SwiftUI

With the latest release of SwiftUI, Apple has introduced a new feature called color mixing. It’s a single function that enables you to perform various creative tasks. In this week’s discussion, we’ll dive into color mixing in SwiftUI and explore its potential adoption.

Adopting Swift 6 across the app codebase

I’ve been using Swift Concurrency since its initial version, which introduced the async and await keywords to enable asynchronous work. Over time, Swift Concurrency has become more powerful and provides robust data-race safety by allowing the Swift compiler to identify potential issues.

Text field enhancements in SwiftUI

From the very first release of the SwiftUI framework, text fields were a weak point of the framework. Over the years, Apple introduced a few enhancements to text fields to improve the developer experience. This week, we will talk about the improvements that SwiftUI introduced for text fields.

The power of previews in Xcode

Previews in Xcode become more powerful every year. Previews in Xcode are not about SwiftUI; you can use them even with UIKit. This week, we will talk about enhancing Previewable and PreviewModifier types, allowing us to build reusable preview environments.

Introducing Swift Testing. Parameterized Tests.

I decided to finalize the topic of the Swift Testing framework with its unique feature called parameterized tests. In a few cases, you need to verify your functions with different inputs, and parameterized tests easily solve this by providing you with a nice overview.