SwiftUI Weekly - Issue #115
The curated collection of links about SwiftUI. Delivered every Monday.
Reading
New BackgroundTask in SwiftUI and How to Test It
Learn the new BackgroundTask in SwiftUI and how to test It. Check how to automatically reschedule it and debug the background tasks in iOS.
Dependency Injection with @State Variables
So, you’ve got some struct models to pass around that end up as @State. How do you do it?
Editable navigation titles in SwiftUI on iOS 16
Let users rename items from the navigation title in the toolbar using the new navigationTitle() modifier that takes a binding.
AppStorage, and observing a Binding
@AppStorage is a property wrapper for UserDefaults, provided by SwiftUI framework. It is very simple to use, but in practice, some simple things are not obvious.
Code
Dynamic-Islands
A sample of dynamic island designs recreated for inspiration.
Video
How to Build a Widget in Swift with WidgetKit
I teach you the basic concepts you'll need to know when building a Widget in Swift. We discuss the Widget timeline, snapshot and how they work. As well as design principles of a great widget. This video will get you up and running into the world of building awesome Widgets.
Updating your SwiftUI app to use NavigationStack in SwiftUI4.0
Updating your SwiftUI app to use NavigationStack in SwiftUI4.0.