SwiftUI views versus modifiers
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?
Articles, podcasts and news about Swift development, by John Sundell.
Swift by Sundell is frequently updated with new articles, podcast episodes, videos, and more.
Subscribe via RSS to get notified when new content gets published.
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?
How the content offset of a SwiftUI ScrollView can be observed without bridging to UIKit.
On this final episode of 2022, Nick Lockwood returns to the show to discuss the overall evolution of Swift and its ecosystem of tools and libraries. How has Swift changed since its original introduction in 2014, how does it compare to other modern programming languages, and how might the language continue to evolve in 2023 and beyond?
Ben Scheirman returns to the show to discuss how Swift’s built-in concurrency features, such as async/await and tasks, can be used in practice when building apps for Apple’s platforms.
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.
Adam Bell returns to the podcast to discuss different techniques and approaches for optimizing UI code, and how to utilize tools like animations in order to build iOS apps that feel fast and responsive.
Donny Wals returns to the show to talk about being an iOS developer freelancer, and to discuss some of the key new APIs, Swift language features, and frameworks that were introduced at WWDC22.
Gui Rambo returns to the show to talk about the role and importance of system design when building apps and open source tools, and how common app architectures and design patterns can be augmented with custom systems.
Thanks a lot to Essential Developer for sponsoring Swift by Sundell.
Natalia Panferova joins John to discuss some of the key new features that are coming to SwiftUI and UIKit in iOS 16, and to talk about her experience working on SwiftUI at Apple.
Different ways to implement a dynamic SwiftUI stack that renders its content either horizontally or vertically, depending on the current context.
Ben Cohen, manager of the Swift team at Apple, joins John on this WWDC22 special to discuss Swift 5.7, how generics have been made more powerful and easy to use, and how the language is expected to evolve towards Swift 6.
How Swift 5.7 makes generic protocols more powerful and easier to work with, thanks to the ‘some’ and ‘any’ keywords.
A quick look at a new, more concise way to unwrap optional values that’s being introduced in Swift 5.7.
Exploring how iOS 16’s new UIHostingConfiguration API enables us to inline SwiftUI views within our UITableView or UICollectionView cells.
Chris Eidhof returns to the podcast to talk about how SwiftUI has evolved since its initial release, to share several key learnings from using it over the past few years, and to discuss concepts like app architecture and state management.
Celebrating the fifth birthday of this website, while also sharing some important announcements about its future.
Simon Støvring returns to the show to talk about how he built his new text editor Runestone, how to effectively manage an app’s settings, performance tuning, and implementing an app’s core logic as a stand-alone framework.
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.
Sommer Panage returns to the show to discuss Apple’s various accessibility APIs and tools, how to incorporate accessibility support into a team’s overall development workflow, and what it was like being an engineering manager at Apple.
What abstract types are, how they could be implemented in Swift, and how they relate to protocols and other polymorphic programming techniques.
Thanks a lot to Judo for sponsoring 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.
On this 2022 season premiere, JP Simard returns to the show to discuss what’s next for Swift in 2022, and what kinds of improvements and new features that might be coming to the language during the year.
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.
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.
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.
A few examples on how to use Swift Concurrency to write asynchronous operations that are automatically retried if an error was encountered.
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.
A look at many different built-in ways to iterate over arrays, dictionaries, and other Swift collections.
Creating convenience APIs that make it possible to convert async/await-based functions into Combine publishers.
How to use either explicit self references or a capture list to capture self strongly within an escaping Swift closure.
To wrap up the 2021 season of the show, John revisits some of the key themes and topics that were discussed both on the show itself, and within the Swift community in general, throughout the year.
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.
James Thomson returns to the show to discuss the various technologies that enable us to render custom UIs on Apple’s platforms. From rendering views using Core Graphics and Core Animation, to building completely custom 3D-based UIs using SceneKit and RealityKit.
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.
How we can use the built-in Task type to delay certain operations when using Swift’s new concurrency system.
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.
Tim Condon joins John to discuss how both client and server-side Swift developers could utilize the new built-in concurrency system, as well as how distributed actors and other upcoming language features might continue to make Swift even more capable on the server.
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.