An example of how to approach the task of building a design system for an app, by focusing on creating an initial set of reusable components that can be tweaked using the SwiftUI environment.| Swift by Sundell
Does marking a given Swift struct property as either ‘let’ or ‘var’ simply determine its mutability, or is there more to it? Let’s explore!| Swift by Sundell
How Swift’s CodableWithConfiguration API can be used to inject additional, required data into a type’s decoding process, without having to use optionals or declare any additional decoding-specific types.| Swift by Sundell
Let’s explore how we can use SwiftUI’s ViewBuilder within our own code, and a few things that can be good to keep in mind when doing so.| Swift by Sundell
How Swift’s defer keyword can be incredibly useful when working with code scopes that have multiple exit points, such as throwing or async functions.| Swift by Sundell
How to combine Foundation’s latest URL APIs with Swift features like macros, to be able to work with both static and dynamic URLs in simpler and more predictable ways.| Swift by Sundell
After a two-year hiatus, Swift by Sundell is finally back, with new articles published on a regular basis.| Swift by Sundell
New in Swift 5.6: We can now use type placeholders to select what generic types that we want the compiler to infer. Let’s take a look at how those placeholders work, and what kinds of situations that they could be really useful in.| Swift by Sundell
Thanks a lot to Judo for sponsoring Swift by Sundell.| Swift by Sundell
Let’s take a look at how Swift models the concept of equality, and how that concept varies between value and reference types.| Swift by Sundell
Let’s take a look at how we can make our UI-related logic fully testable, even when that logic is primarily used within SwiftUI-based views.| Swift by Sundell
How SwiftUI enables us to stack views along the Z axis, which in turn makes it possible to create all sorts of backgrounds, overlays, and other effects.| Swift by Sundell
A look at many different built-in ways to iterate over arrays, dictionaries, and other Swift collections.| Swift by Sundell
How we can use the built-in Task type to delay certain operations when using Swift’s new concurrency system.| Swift by Sundell
How to make it possible to use async system APIs on earlier operating system versions.| Swift by Sundell
How SwiftUI’s List and ForEach types can be used to build lists that support inline editing, moving, and deletions, and how we can then build our own abstractions on top of those built-in types.| Swift by Sundell
How we can take direct control over SwiftUI’s navigation system, which enables us to dynamically show and hide views within either a TabView or NavigationView.| Swift by Sundell
How to preview a SwiftUI view in landscape using Xcode 13, and how to enable that new feature to be used within projects that also support previous iOS versions.| Swift by Sundell
How Codable’s auto-synthesis works for enums, and how that part of the system has been upgraded in Swift 5.5 to support associated values.| Swift by Sundell
How Swift’s AsyncSequence and AsyncStream APIs can be used to build asynchronous sequences, and how they relate to Apple’s Combine framework.| Swift by Sundell
Various techniques that let us define fully dynamic colors that adapt to the user’s selected color scheme, using either SwiftUI or UIKit.| Swift by Sundell
How Swift 5.5 enables computed properties to become either throwing or asynchronous, and what sort of situations that these new capabilities could become useful in.| Swift by Sundell
What sort of capabilities that a mutating Swift context has, and what the mutating and nonmutating keywords do.| Swift by Sundell
Three different ways to dismiss a SwiftUI view that was presented from another view, including a new API that’s being introduced in iOS 15.| Swift by Sundell
A look at how SwiftUI’s new refreshable modifier can be used to either add pull-to-refresh to a list, or to build completely custom reloading UIs and logic.| Swift by Sundell
Availability checks let us conditionally use new system APIs and features while still enabling the rest of our code to keep running on older system versions. Let’s take a look at how they can be used.| Swift by Sundell
Let’s explore a few ways to “bridge the gap” between the new world of async/await and other kinds of asynchronous Swift code.| Swift by Sundell
How a custom SwiftUI button that’s capable of running asynchronous actions can be created, and how to make such a control versatile and easy to reuse across a project.| Swift by Sundell
What’s really the difference between building a piece of UI as a view versus a modifier, and how to choose between those two solutions?| Swift by Sundell
How the content offset of a SwiftUI ScrollView can be observed without bridging to UIKit.| Swift by Sundell
Thanks a lot to Essential Developer for sponsoring Swift by Sundell.| Swift by Sundell
What abstract types are, how they could be implemented in Swift, and how they relate to protocols and other polymorphic programming techniques.| Swift by Sundell
A few examples on how to use Swift Concurrency to write asynchronous operations that are automatically retried if an error was encountered.| Swift by Sundell
Explore Swift’s built-in concurrency system, and how to use tools like async/await and actors to write concurrent code in robust and efficient ways.| Swift by Sundell
Starting in Xcode 13.2, Swift’s new suite of concurrency features are now backward compatible all the way back to iOS 13, macOS Catalina, watchOS 6, and tvOS 13.| Swift by Sundell
Learn how to fully utilize Swift’s powerful generics system to write reusable types, functions, extensions, and protocols.| Swift by Sundell
Discover Swift’s Codable protocol, how to fully leverage its compiler synthesis features, and how to use its surrounding APIs to write efficient serialization code.| Swift by Sundell
Thanks a lot to Paste for sponsoring Swift by Sundell.| Swift by Sundell
Thanks a lot to ViRE for sponsoring Swift by Sundell.| Swift by Sundell
How Swift’s opaque return types can be combined with primary associated types in order to create powerful abstractions without the need for any type erasure.| Swift by Sundell
Different ways to implement a dynamic SwiftUI stack that renders its content either horizontally or vertically, depending on the current context.| Swift by Sundell
How Swift 5.7 makes generic protocols more powerful and easier to work with, thanks to the ‘some’ and ‘any’ keywords.| Swift by Sundell
A quick look at a new, more concise way to unwrap optional values that’s being introduced in Swift 5.7.| Swift by Sundell
Exploring how iOS 16’s new UIHostingConfiguration API enables us to inline SwiftUI views within our UITableView or UICollectionView cells.| Swift by Sundell
Celebrating the fifth birthday of this website, while also sharing some important announcements about its future.| Swift by Sundell
Let’s take a look at various ways to combine multiple protocols into new functionality, either by using protocol extensions, composition, or by defining dedicated types.| Swift by Sundell
Managing an app’s memory is something that tends to be especially tricky when it comes to asynchronous code, so let’s take a look at how to do just that when using async/await.| Swift by Sundell
Great options for when we don’t want to create a whole new Xcode project just to try out a quick UI idea.| Swift by Sundell
When using multiple computed properties within SwiftUI views could become problematic, and various approaches to fix those kinds of problems.| Swift by Sundell
Swift’s enums are awesome, but they’re not always the best choice for modeling a given piece of data. Let’s explore why that is, and what other tools that can be good to keep in mind in order to avoid certain problematic enum cases.| Swift by Sundell
With the start of WWDC21 just around the corner, I’d like to share some of my biggest hopes and dreams for this year’s edition of the conference.| Swift by Sundell
How the MainActor attribute eliminates the need for us to manually dispatch UI updates on the main queue when using Swift 5.5’s new concurrency system.| Swift by Sundell
How the Swift compiler is now able to automatically perform conversions between Double and CGFloat values.| Swift by Sundell
Various ways to handle mismatches between how an external type is expected to be coded and the data format that an app is using.| Swift by Sundell
Let’s explore how we can make it possible to call async/await-powered APIs within a Combine pipeline.| Swift by Sundell
How to compose multiple SwiftUI views to render a shape that’s both stroked and filled at the same time.| Swift by Sundell
New in Swift 5.5: Property wrappers can now be applied directly to function arguments, just like how they can be used to add additional functionality to a property or local variable.| Swift by Sundell
What Swift’s @unknown attribute does, and why the compiler tells us to use it when switching on certain enums.| Swift by Sundell
How we can now use Swift’s very convenient “dot syntax” to refer to protocol-conforming types, and how that improves some of SwiftUI’s styling APIs.| Swift by Sundell
How Swift 5.5 enables us to conditionally compile postfix member expressions using compiler directives, and what kinds of situations that this new feature could be useful in.| Swift by Sundell
How the share operator enables a Combine publisher to be reused without requiring duplicate work to be performed for each subscriber.| Swift by Sundell
Let’s take a look at which of the new SwiftUI APIs that are backward compatible with earlier OS versions, and what language features that made that possible.| Swift by Sundell
How Swift’s generics system enables us to create specialized extensions that only apply to types that fit certain requirements, and how that capability can be really useful.| Swift by Sundell
Let’s take a look at a few different ways to run multiple tasks in parallel when using Swift’s built-in concurrency system, and when each of those techniques can be especially useful.| Swift by Sundell
Let’s take a look at how we can utilize Swift’s built-in concurrency system when performing data transformations using functions like forEach and map.| Swift by Sundell
What’s the difference between those two ways, and when should which be used?| Swift by Sundell
Let’s take a look at how to call async APIs within our unit tests, and also how async/await can be a great testing tool in general.| Swift by Sundell
Let’s explore Swift’s version of actors, and what kind of problems that we could solve by defining custom actor types within our code bases.| Swift by Sundell
How Swift’s new Task type works, and how it enables us to encapsulate, observe, and control the way that our asynchronous code is executed.| Swift by Sundell
Let’s explore how we could make use of Swift’s async/await capabilities to make our asynchronous code fully testable in a very lightweight way.| Swift by Sundell
How to use either explicit self references or a capture list to capture self strongly within an escaping Swift closure.| Swift by Sundell
Creating convenience APIs that make it possible to convert async/await-based functions into Combine publishers.| Swift by Sundell