Handling loading states within SwiftUI views
A few different patterns and approaches that can be used to handle and render asynchronous loading states within SwiftUI-based views.
Articles, podcasts and news about Swift development, by John Sundell.
A few different patterns and approaches that can be used to handle and render asynchronous loading states within SwiftUI-based views.
A look at various ways to use the many file system-related APIs that Swift offers — both on Apple’s own platforms, and on platforms like Linux — and a few things that can be good to keep in mind when working with those APIs.
This week, let’s take a closer look at each of SwiftUI’s state handling property wrappers, how they relate to each other, and how they make up different parts of SwiftUI’s overall state management system.
Let’s take a look at how combining value and reference types can unlock some really powerful capabilities, enabling us to utilize both the convenience of reference types, and the safety and limited mutability of value types.
Let’s take a look at how caching can be an incredibly powerful tool in various situations, how to build an efficient and elegant caching API in Swift, and how strategically caching various values and objects can have a big impact on the overall performance of an app.
Even though closures are very widely used, there's a lot of behaviors and caveats to keep in mind when using them. This week, let's take a closer look at closures, how capturing works and some techniques that can make handling them easier.
Shared state is a really common source of bugs in most apps. It's what happens when you (accidentally or by design) have multiple parts of a system that rely on the same mutable state. This week, let's take a look at how shared state can be avoided in many situations, by using the factory pattern to create clearly separated instances that each manage their own state.
One of the hardest parts of building apps is deciding how to model state. Code managing state is also a very common source of bugs, when parts of our app might end up in a state we didn't expect. This week, let's take a look at some techniques that can make it easier to write code that handles and reacts to state changes.
Even though Optionals are one of the most important features of Swift, sometimes they can put you in somewhat of a tight spot. Let's take a look at how to avoid those situations, and how to deal with non-optional optionals in a nice way.
How to use custom, lazily evaluated sequences in Swift to improve performance and enable you to deal with larger datasets, such as entries in a database.