SwiftUI Weekly - Issue #150
The curated collection of links about SwiftUI. Delivered every Monday.
Reading
Mastering Swift Foundation Formatter API. Custom Format Styles
Swift Foundation Formatter API is one of my favorite recent additions to the Swift ecosystem. I use it in every project and build my custom-type formatting logic using the same approach. This week we will learn how to introduce custom formatters and use them with our own types.
Hotfixing widgets for iOS 17: containerBackground + padding
If you built your app that has Home Screen widgets with Xcode 15 you might notice they are broken now. Apple has introduced some big changes to widgets that you need to take into account. One issue is that instead of your widget content, you might see just a message that says: “please adopt containerBackground API”.
Difference Between Implicit and Explicit Animations in SwiftUI
You are trying to animate a view but some parts keep jumping around while other animate correctly.
How to create a custom reusable toolbar in SwiftUI
Learn how to abstract a SwiftUI toolbar into a component.
Migrating to Observable
A quick guide to migrating an ObservableObject to Observable.
Code
swift-unidirectional-flow
Unidirectional flow implemented using the latest Swift Generics and Swift Concurrency features.
Videos
Easily Preload SwiftData On Your App’s First Launch
In this SwiftData tutorial, we'll look at Pre-filling A SwiftData ModelContainer within our To-Do list app. We'll see how to easily preload SwiftData on your app's first launch. By adding some default categories that a user can choose from.